diff --git a/.gitignore b/.gitignore index d7a5f58..78a9770 100644 --- a/.gitignore +++ b/.gitignore @@ -1 +1 @@ -/vyper-0.4.0.tar.gz +/vyper-*.tar.gz diff --git a/sources b/sources index 27f2859..7ebc4bb 100644 --- a/sources +++ b/sources @@ -1 +1 @@ -SHA512 (vyper-0.4.0.tar.gz) = 0ad76740ba745a554ccbdc938a8f71a4df22bc9e459e645b128d1cfebcc54975e0941976874fc26196c9149c12e44bdb5d5be18ec2a9b0fecb31a2a9c530b98c +SHA512 (vyper-0.4.3.tar.gz) = cda058f58deed9ed5e64179c6ccb880cefa103c93008659e09c699f0d40825eaffa1b5c19ff7f93ef80b926d6c69a43c9dbfb80113e59d6a8a457f8bbbc6fbb4 diff --git a/vyper-0001-Use-Cryptodomex.patch b/vyper-0001-Use-Cryptodomex.patch index 01dbd09..2f9d213 100644 --- a/vyper-0001-Use-Cryptodomex.patch +++ b/vyper-0001-Use-Cryptodomex.patch @@ -5,28 +5,28 @@ Subject: [PATCH] Use Cryptodomex Signed-off-by: Peter Lemenkov diff --git a/setup.py b/setup.py -index 6e48129c..e2b0688d 100644 +index a3cb94c5..4daf01be 100644 --- a/setup.py +++ b/setup.py @@ -92,7 +92,7 @@ setup( install_requires=[ "cbor2>=5.4.6,<6", - "asttokens>=2.0.5,<3", + "asttokens>=2.0.5,<4", - "pycryptodome>=3.5.1,<4", + "pycryptodomex>=3.5.1,<4", - "packaging>=23.1,<24", - "importlib-metadata", + "packaging>=23.1", + "lark>=1.0.0,<2", "wheel", diff --git a/vyper/utils.py b/vyper/utils.py -index 2b95485f..1968c281 100644 +index 9b1084ab..2896a1e0 100644 --- a/vyper/utils.py +++ b/vyper/utils.py -@@ -184,7 +184,7 @@ decimal.setcontext(DecimalContextOverride(prec=78)) +@@ -11,7 +11,7 @@ import traceback + import warnings + from typing import Generic, Iterable, Iterator, List, Set, TypeVar, Union +-from Crypto.Hash import keccak ++from Cryptodome.Hash import keccak - try: -- from Crypto.Hash import keccak # type: ignore -+ from Cryptodome.Hash import keccak # type: ignore + from vyper.exceptions import CompilerPanic, DecimalOverrideException - keccak256 = lambda x: keccak.new(digest_bits=256, data=x).digest() # noqa: E731 - except ImportError: diff --git a/vyper-0002-Ease-version-requirements.patch b/vyper-0002-Ease-version-requirements.patch index 8ad275d..f7306bf 100644 --- a/vyper-0002-Ease-version-requirements.patch +++ b/vyper-0002-Ease-version-requirements.patch @@ -5,20 +5,15 @@ Subject: [PATCH] Ease version requirements Signed-off-by: Peter Lemenkov diff --git a/setup.py b/setup.py -index e2b0688d..82755981 100644 +index 4daf01be..e6613671 100644 --- a/setup.py +++ b/setup.py -@@ -93,11 +93,11 @@ setup( - "cbor2>=5.4.6,<6", - "asttokens>=2.0.5,<3", - "pycryptodomex>=3.5.1,<4", -- "packaging>=23.1,<24", -+ "packaging>=23.1", - "importlib-metadata", +@@ -98,7 +98,7 @@ setup( "wheel", + "immutables", ], -- setup_requires=["pytest-runner", "setuptools_scm>=7.1.0,<8.0.0"], -+ setup_requires=["pytest-runner", "setuptools_scm>=7.1.0"], - tests_require=extras_require["test"], +- setup_requires=["setuptools_scm>=7.1.0,<8.0.0"], ++ setup_requires=["setuptools_scm>=7.1.0"], extras_require=extras_require, entry_points={ + "console_scripts": [ diff --git a/vyper-0003-Lark-should-go-to-the-main-install-section-as-it-use.patch b/vyper-0003-Lark-should-go-to-the-main-install-section-as-it-use.patch deleted file mode 100644 index a756bfc..0000000 --- a/vyper-0003-Lark-should-go-to-the-main-install-section-as-it-use.patch +++ /dev/null @@ -1,27 +0,0 @@ -From: Peter Lemenkov -Date: Thu, 25 Jul 2024 23:18:23 +0200 -Subject: [PATCH] Lark should go to the main install section as it used not - only for tests - -Signed-off-by: Peter Lemenkov - -diff --git a/setup.py b/setup.py -index 82755981..94477f03 100644 ---- a/setup.py -+++ b/setup.py -@@ -15,7 +15,6 @@ extras_require = { - "pytest-split>=0.7.0,<1.0", - "eth_abi>=5.0.0,<6.0.0", - "py-evm>=0.10.1b1,<0.11", -- "lark==1.1.9", - "hypothesis[lark]>=6.0,<7.0", - "eth-stdlib==0.2.7", - "eth-account==0.12.2", -@@ -92,6 +91,7 @@ setup( - install_requires=[ - "cbor2>=5.4.6,<6", - "asttokens>=2.0.5,<3", -+ "lark==1.1.9", - "pycryptodomex>=3.5.1,<4", - "packaging>=23.1", - "importlib-metadata", diff --git a/vyper-0004-Remove-unnecessary-shebang.patch b/vyper-0003-Remove-unnecessary-shebang.patch similarity index 100% rename from vyper-0004-Remove-unnecessary-shebang.patch rename to vyper-0003-Remove-unnecessary-shebang.patch diff --git a/vyper-0005-Relax-lark-requirement-testing-only-anyway.patch b/vyper-0005-Relax-lark-requirement-testing-only-anyway.patch deleted file mode 100644 index 8ec768e..0000000 --- a/vyper-0005-Relax-lark-requirement-testing-only-anyway.patch +++ /dev/null @@ -1,19 +0,0 @@ -From: Peter Lemenkov -Date: Thu, 8 Aug 2024 20:33:53 +0200 -Subject: [PATCH] Relax lark requirement (testing only anyway) - -Signed-off-by: Peter Lemenkov - -diff --git a/setup.py b/setup.py -index 94477f03..61cf2f76 100644 ---- a/setup.py -+++ b/setup.py -@@ -91,7 +91,7 @@ setup( - install_requires=[ - "cbor2>=5.4.6,<6", - "asttokens>=2.0.5,<3", -- "lark==1.1.9", -+ "lark>=1.1.7", - "pycryptodomex>=3.5.1,<4", - "packaging>=23.1", - "importlib-metadata", diff --git a/vyper.spec b/vyper.spec index 52e148c..7235dd1 100644 --- a/vyper.spec +++ b/vyper.spec @@ -1,47 +1,47 @@ -%global git_commit e9db8d9f7486eae38f5b86531629019ad28f514e +%global git_commit bff19ea204059290da652854cd634abef10f6c43 Summary: Pythonic Smart Contract Language for the EVM Name: vyper -Version: 0.4.0 +Version: 0.4.3 Release: %autorelease BuildArch: noarch License: Apache-2.0 URL: https://vyperlang.org Source0: %{pypi_source %{name}} -Patch1: vyper-0001-Use-Cryptodomex.patch -Patch2: vyper-0002-Ease-version-requirements.patch -Patch3: vyper-0003-Lark-should-go-to-the-main-install-section-as-it-use.patch -Patch4: vyper-0004-Remove-unnecessary-shebang.patch -Patch5: vyper-0005-Relax-lark-requirement-testing-only-anyway.patch +# Fedora-specific +Patch: vyper-0001-Use-Cryptodomex.patch +# Reverts https://github.com/vyperlang/vyper/pull/3613 +Patch: vyper-0002-Ease-version-requirements.patch +Patch: vyper-0003-Remove-unnecessary-shebang.patch BuildRequires: git -BuildRequires: python3-devel +BuildRequires: python3-cached_property +BuildRequires: python3-eth-abi +BuildRequires: python3-eth-keys +BuildRequires: python3-eth-stdlib +BuildRequires: python3-hypothesis +BuildRequires: python3-pytest +BuildRequires: python3-rlp +BuildSystem: pyproject +BuildOption(install): -l %{name} %description %{summary}. -%prep -%autosetup -p1 +%prep -a echo %{sub %git_commit 0 7} > ./vyper/vyper_git_commithash.txt -%generate_buildrequires -%pyproject_buildrequires - -%build -%pyproject_wheel - -%install -%pyproject_install -%pyproject_save_files -l %{name} +%install -a rm -f %{buildroot}/usr/vyper_git_commithash.txt -%check -%pyproject_check_import -# FIXME not enough dependencies +%check -a +# FIXME requires https://github.com/ethereum/py-evm +# FIXME requires https://github.com/paradigmxyz/pyrevm #%%pytest %files -f %{pyproject_files} %doc README.md SECURITY.md %{_bindir}/fang +%{_bindir}/venom %{_bindir}/vyper %{_bindir}/vyper-json