Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

vyper: init at 0.2.8 #104758

Merged
merged 2 commits into from Jan 11, 2021
Merged

vyper: init at 0.2.8 #104758

merged 2 commits into from Jan 11, 2021

Conversation

siraben
Copy link
Member

@siraben siraben commented Nov 24, 2020

Motivation for this change

Add Vyper compiler.

vyper.py
storedData: public(int128)

@external
def __init__(_x: int128):
  self.storedData = _x

@external
def set(_x: int128):
  self.storedData = _x
$ ./result/bin/vyper contract.vy | sha256sum
3bbc19c98dcb167c54eee82987c7ad85a806554cd1e351713c85447374d9f755  -
Things done
  • Tested using sandboxing (nix.useSandbox on NixOS, or option sandbox in nix.conf on non-NixOS linux)
  • Built on platform(s)
    • NixOS
    • macOS
    • other Linux distributions
  • Tested via one or more NixOS test(s) if existing and applicable for the change (look inside nixos/tests)
  • Tested compilation of all pkgs that depend on this change using nix-shell -p nixpkgs-review --run "nixpkgs-review wip"
  • Tested execution of all binary files (usually in ./result/bin/)
  • Determined the impact on package closure size (by running nix path-info -S before and after)
  • Ensured that relevant documentation is up to date
  • Fits CONTRIBUTING.md.

@siraben
Copy link
Member Author

siraben commented Nov 24, 2020

Result of nixpkgs-review pr 104758 1

1 package built:
  • vyper (python27Packages.vyper)

@siraben
Copy link
Member Author

siraben commented Nov 24, 2020

Commenting out any one of those ignored tests results in the test failing, for instance if I comment out "test_calldatacopy", the test fails with

[gw1] darwin -- Python 3.8.6 /nix/store/0mabx9absir73mmijrsv0dsyvyya463r-python3-3.8.6/bin/python3.8
file /private/tmp/nix-build-python3.8-vyper-0.2.7.drv-0/vyper-0.2.7/tests/compiler/test_calldatacopy.py, line 1
  def test_calldatacopy(get_contract_from_lll):
E       fixture 'get_contract_from_lll' not found
>       available fixtures: cache, capfd, capfdbinary, caplog, capsys, capsysbinary, cov, doctest_namespace, monkeypatch, no_cover, pytestconfig, record_property, record_testsuite_property, record_xml_attribute, recwarn, testrun_uid, tmp_path, tmp_path_factory, tmpdir, tmpdir_factory, worker_id
>       use 'pytest --fixtures [testpath]' for help on them.

/private/tmp/nix-build-python3.8-vyper-0.2.7.drv-0/vyper-0.2.7/tests/compiler/test_calldatacopy.py:

What could be causing this issue? I'm not very familiar with pytest.

pkgs/development/compilers/vyper/default.nix Outdated Show resolved Hide resolved
pkgs/development/compilers/vyper/default.nix Outdated Show resolved Hide resolved
pkgs/development/compilers/vyper/default.nix Outdated Show resolved Hide resolved
@SuperSandro2000
Copy link
Member

Result of nixpkgs-review pr 104758 run on x86_64-linux 1

2 packages failed to build:
  • python37Packages.vyper
  • vyper (python38Packages.vyper)
Sourcing python-remove-tests-dir-hook
Sourcing python-catch-conflicts-hook.sh
Sourcing python-remove-bin-bytecode-hook.sh
Sourcing setuptools-build-hook
Using setuptoolsBuildPhase
Using setuptoolsShellHook
Sourcing pip-install-hook
Using pipInstallPhase
Sourcing python-imports-check-hook.sh
Using pythonImportsCheckPhase
Sourcing python-namespaces-hook
Sourcing setuptools-check-hook
Using setuptoolsCheckPhase
Sourcing pytest-check-hook
Using pytestCheckPhase
Removing setuptoolsCheckPhase
@nix { "action": "setPhase", "phase": "unpackPhase" }
unpacking sources
unpacking source archive /nix/store/wlzr1s9bsi9mv4jr64h0i5wm4bdjwshj-vyper-0.2.8.tar.gz
source root is vyper-0.2.8
setting SOURCE_DATE_EPOCH to timestamp 1607055587 of file vyper-0.2.8/setup.cfg
@nix { "action": "setPhase", "phase": "patchPhase" }
patching sources
substituteStream(): WARNING: pattern 'asttokens==2.0.3' doesn't match anything in file 'setup.py'
@nix { "action": "setPhase", "phase": "configurePhase" }
configuring
no configure script, doing nothing
@nix { "action": "setPhase", "phase": "buildPhase" }
building
Executing setuptoolsBuildPhase
fatal: not a git repository (or any parent up to mount point /)
Stopping at filesystem boundary (GIT_DISCOVERY_ACROSS_FILESYSTEM not set).
�[33mWARNING: The directory '/homeless-shelter/.cache/pip' or its parent directory is not owned or is not writable by the current user. The cache has been disabled. Check the permissions and owner of that directory. If executing pip with sudo, you may want sudo's -H flag.�[0m
�[33mWARNING: Retrying (Retry(total=4, connect=None, read=None, redirect=None, status=None)) after connection broken by 'NewConnectionError('<pip._vendor.urllib3.connection.HTTPSConnection object at 0x7ffff5d4e0a0>: Failed to establish a new connection: [Errno -2] Name or service not known')': /simple/pytest-runner/�[0m
�[33mWARNING: Retrying (Retry(total=3, connect=None, read=None, redirect=None, status=None)) after connection broken by 'NewConnectionError('<pip._vendor.urllib3.connection.HTTPSConnection object at 0x7ffff5d4e2b0>: Failed to establish a new connection: [Errno -2] Name or service not known')': /simple/pytest-runner/�[0m
�[33mWARNING: Retrying (Retry(total=2, connect=None, read=None, redirect=None, status=None)) after connection broken by 'NewConnectionError('<pip._vendor.urllib3.connection.HTTPSConnection object at 0x7ffff5d4e460>: Failed to establish a new connection: [Errno -2] Name or service not known')': /simple/pytest-runner/�[0m
�[33mWARNING: Retrying (Retry(total=1, connect=None, read=None, redirect=None, status=None)) after connection broken by 'NewConnectionError('<pip._vendor.urllib3.connection.HTTPSConnection object at 0x7ffff5d4e610>: Failed to establish a new connection: [Errno -2] Name or service not known')': /simple/pytest-runner/�[0m
�[33mWARNING: Retrying (Retry(total=0, connect=None, read=None, redirect=None, status=None)) after connection broken by 'NewConnectionError('<pip._vendor.urllib3.connection.HTTPSConnection object at 0x7ffff5d4e7c0>: Failed to establish a new connection: [Errno -2] Name or service not known')': /simple/pytest-runner/�[0m
�[31mERROR: Could not find a version that satisfies the requirement pytest-runner�[0m
�[31mERROR: No matching distribution found for pytest-runner�[0m
Traceback (most recent call last):
  File "/nix/store/fq80qh3nhskba61xr27pfiy9wdfn6139-python3.8-setuptools-50.3.1/lib/python3.8/site-packages/setuptools/installer.py", line 126, in fetch_build_egg
    subprocess.check_call(cmd)
  File "/nix/store/jdp800qwb3v330ggl6iq722ww96q2444-python3-3.8.6/lib/python3.8/subprocess.py", line 364, in check_call
    raise CalledProcessError(retcode, cmd)
subprocess.CalledProcessError: Command '['/nix/store/jdp800qwb3v330ggl6iq722ww96q2444-python3-3.8.6/bin/python3.8', '-m', 'pip', '--disable-pip-version-check', 'wheel', '--no-deps', '-w', '/build/tmpz0uuze52', '--quiet', 'pytest-runner']' returned non-zero exit status 1.

The above exception was the direct cause of the following exception:

Traceback (most recent call last):
  File "nix_run_setup", line 8, in <module>
    exec(compile(getattr(tokenize, 'open', open)(__file__).read().replace('\\r\\n', '\\n'), __file__, 'exec'))
  File "setup.py", line 51, in <module>
    setup(
  File "/nix/store/fq80qh3nhskba61xr27pfiy9wdfn6139-python3.8-setuptools-50.3.1/lib/python3.8/site-packages/setuptools/__init__.py", line 152, in setup
    _install_setup_requires(attrs)
  File "/nix/store/fq80qh3nhskba61xr27pfiy9wdfn6139-python3.8-setuptools-50.3.1/lib/python3.8/site-packages/setuptools/__init__.py", line 147, in _install_setup_requires
    dist.fetch_build_eggs(dist.setup_requires)
  File "/nix/store/fq80qh3nhskba61xr27pfiy9wdfn6139-python3.8-setuptools-50.3.1/lib/python3.8/site-packages/setuptools/dist.py", line 673, in fetch_build_eggs
    resolved_dists = pkg_resources.working_set.resolve(
  File "/nix/store/fq80qh3nhskba61xr27pfiy9wdfn6139-python3.8-setuptools-50.3.1/lib/python3.8/site-packages/pkg_resources/__init__.py", line 764, in resolve
    dist = best[req.key] = env.best_match(
  File "/nix/store/fq80qh3nhskba61xr27pfiy9wdfn6139-python3.8-setuptools-50.3.1/lib/python3.8/site-packages/pkg_resources/__init__.py", line 1049, in best_match
    return self.obtain(req, installer)
  File "/nix/store/fq80qh3nhskba61xr27pfiy9wdfn6139-python3.8-setuptools-50.3.1/lib/python3.8/site-packages/pkg_resources/__init__.py", line 1061, in obtain
    return installer(requirement)
  File "/nix/store/fq80qh3nhskba61xr27pfiy9wdfn6139-python3.8-setuptools-50.3.1/lib/python3.8/site-packages/setuptools/dist.py", line 732, in fetch_build_egg
    return fetch_build_egg(self, req)
  File "/nix/store/fq80qh3nhskba61xr27pfiy9wdfn6139-python3.8-setuptools-50.3.1/lib/python3.8/site-packages/setuptools/installer.py", line 128, in fetch_build_egg
    raise DistutilsError(str(e)) from e
distutils.errors.DistutilsError: Command '['/nix/store/jdp800qwb3v330ggl6iq722ww96q2444-python3-3.8.6/bin/python3.8', '-m', 'pip', '--disable-pip-version-check', 'wheel', '--no-deps', '-w', '/build/tmpz0uuze52', '--quiet', 'pytest-runner']' returned non-zero exit status 1.
Sourcing python-remove-tests-dir-hook
Sourcing python-catch-conflicts-hook.sh
Sourcing python-remove-bin-bytecode-hook.sh
Sourcing setuptools-build-hook
Using setuptoolsBuildPhase
Using setuptoolsShellHook
Sourcing pip-install-hook
Using pipInstallPhase
Sourcing python-imports-check-hook.sh
Using pythonImportsCheckPhase
Sourcing python-namespaces-hook
Sourcing setuptools-check-hook
Using setuptoolsCheckPhase
Sourcing pytest-check-hook
Using pytestCheckPhase
Removing setuptoolsCheckPhase
@nix { "action": "setPhase", "phase": "unpackPhase" }
unpacking sources
unpacking source archive /nix/store/wlzr1s9bsi9mv4jr64h0i5wm4bdjwshj-vyper-0.2.8.tar.gz
source root is vyper-0.2.8
setting SOURCE_DATE_EPOCH to timestamp 1607055587 of file vyper-0.2.8/setup.cfg
@nix { "action": "setPhase", "phase": "patchPhase" }
patching sources
substituteStream(): WARNING: pattern 'asttokens==2.0.3' doesn't match anything in file 'setup.py'
@nix { "action": "setPhase", "phase": "configurePhase" }
configuring
no configure script, doing nothing
@nix { "action": "setPhase", "phase": "buildPhase" }
building
Executing setuptoolsBuildPhase
fatal: not a git repository (or any parent up to mount point /)
Stopping at filesystem boundary (GIT_DISCOVERY_ACROSS_FILESYSTEM not set).
�[33mWARNING: The directory '/homeless-shelter/.cache/pip' or its parent directory is not owned or is not writable by the current user. The cache has been disabled. Check the permissions and owner of that directory. If executing pip with sudo, you may want sudo's -H flag.�[0m
�[33mWARNING: Retrying (Retry(total=4, connect=None, read=None, redirect=None, status=None)) after connection broken by 'NewConnectionError('<pip._vendor.urllib3.connection.HTTPSConnection object at 0x7ffff5d4e730>: Failed to establish a new connection: [Errno -2] Name or service not known')': /simple/pytest-runner/�[0m
�[33mWARNING: Retrying (Retry(total=3, connect=None, read=None, redirect=None, status=None)) after connection broken by 'NewConnectionError('<pip._vendor.urllib3.connection.HTTPSConnection object at 0x7ffff5d4e940>: Failed to establish a new connection: [Errno -2] Name or service not known')': /simple/pytest-runner/�[0m
�[33mWARNING: Retrying (Retry(total=2, connect=None, read=None, redirect=None, status=None)) after connection broken by 'NewConnectionError('<pip._vendor.urllib3.connection.HTTPSConnection object at 0x7ffff5d4eaf0>: Failed to establish a new connection: [Errno -2] Name or service not known')': /simple/pytest-runner/�[0m
�[33mWARNING: Retrying (Retry(total=1, connect=None, read=None, redirect=None, status=None)) after connection broken by 'NewConnectionError('<pip._vendor.urllib3.connection.HTTPSConnection object at 0x7ffff5d4eca0>: Failed to establish a new connection: [Errno -2] Name or service not known')': /simple/pytest-runner/�[0m
�[33mWARNING: Retrying (Retry(total=0, connect=None, read=None, redirect=None, status=None)) after connection broken by 'NewConnectionError('<pip._vendor.urllib3.connection.HTTPSConnection object at 0x7ffff5d4ee50>: Failed to establish a new connection: [Errno -2] Name or service not known')': /simple/pytest-runner/�[0m
�[31mERROR: Could not find a version that satisfies the requirement pytest-runner�[0m
�[31mERROR: No matching distribution found for pytest-runner�[0m
Traceback (most recent call last):
  File "/nix/store/fq80qh3nhskba61xr27pfiy9wdfn6139-python3.8-setuptools-50.3.1/lib/python3.8/site-packages/setuptools/installer.py", line 126, in fetch_build_egg
    subprocess.check_call(cmd)
  File "/nix/store/jdp800qwb3v330ggl6iq722ww96q2444-python3-3.8.6/lib/python3.8/subprocess.py", line 364, in check_call
    raise CalledProcessError(retcode, cmd)
subprocess.CalledProcessError: Command '['/nix/store/jdp800qwb3v330ggl6iq722ww96q2444-python3-3.8.6/bin/python3.8', '-m', 'pip', '--disable-pip-version-check', 'wheel', '--no-deps', '-w', '/build/tmp9vk6yz2s', '--quiet', 'pytest-runner']' returned non-zero exit status 1.

The above exception was the direct cause of the following exception:

Traceback (most recent call last):
  File "nix_run_setup", line 8, in <module>
    exec(compile(getattr(tokenize, 'open', open)(__file__).read().replace('\\r\\n', '\\n'), __file__, 'exec'))
  File "setup.py", line 51, in <module>
    setup(
  File "/nix/store/fq80qh3nhskba61xr27pfiy9wdfn6139-python3.8-setuptools-50.3.1/lib/python3.8/site-packages/setuptools/__init__.py", line 152, in setup
    _install_setup_requires(attrs)
  File "/nix/store/fq80qh3nhskba61xr27pfiy9wdfn6139-python3.8-setuptools-50.3.1/lib/python3.8/site-packages/setuptools/__init__.py", line 147, in _install_setup_requires
    dist.fetch_build_eggs(dist.setup_requires)
  File "/nix/store/fq80qh3nhskba61xr27pfiy9wdfn6139-python3.8-setuptools-50.3.1/lib/python3.8/site-packages/setuptools/dist.py", line 673, in fetch_build_eggs
    resolved_dists = pkg_resources.working_set.resolve(
  File "/nix/store/fq80qh3nhskba61xr27pfiy9wdfn6139-python3.8-setuptools-50.3.1/lib/python3.8/site-packages/pkg_resources/__init__.py", line 764, in resolve
    dist = best[req.key] = env.best_match(
  File "/nix/store/fq80qh3nhskba61xr27pfiy9wdfn6139-python3.8-setuptools-50.3.1/lib/python3.8/site-packages/pkg_resources/__init__.py", line 1049, in best_match
    return self.obtain(req, installer)
  File "/nix/store/fq80qh3nhskba61xr27pfiy9wdfn6139-python3.8-setuptools-50.3.1/lib/python3.8/site-packages/pkg_resources/__init__.py", line 1061, in obtain
    return installer(requirement)
  File "/nix/store/fq80qh3nhskba61xr27pfiy9wdfn6139-python3.8-setuptools-50.3.1/lib/python3.8/site-packages/setuptools/dist.py", line 732, in fetch_build_egg
    return fetch_build_egg(self, req)
  File "/nix/store/fq80qh3nhskba61xr27pfiy9wdfn6139-python3.8-setuptools-50.3.1/lib/python3.8/site-packages/setuptools/installer.py", line 128, in fetch_build_egg
    raise DistutilsError(str(e)) from e
distutils.errors.DistutilsError: Command '['/nix/store/jdp800qwb3v330ggl6iq722ww96q2444-python3-3.8.6/bin/python3.8', '-m', 'pip', '--disable-pip-version-check', 'wheel', '--no-deps', '-w', '/build/tmp9vk6yz2s', '--quiet', 'pytest-runner']' returned non-zero exit status 1.

@siraben siraben changed the title vyper: init at 0.2.7 vyper: init at 0.2.8 Dec 29, 2020
@SuperSandro2000
Copy link
Member

SuperSandro2000 commented Jan 1, 2021

Executing setuptoolsBuildPhase
WARNING: The directory '/homeless-shelter/.cache/pip' or its parent directory is not owned or is not writable by the current user. The cache has been disabled. Check the permissions and o>WARNING: Retrying (Retry(total=4, connect=None, read=None, redirect=None, status=None)) after connection broken by 'NewConnectionError('<pip._vendor.urllib3.connection.HTTPSConnection obj>WARNING: Retrying (Retry(total=3, connect=None, read=None, redirect=None, status=None)) after connection broken by 'NewConnectionError('<pip._vendor.urllib3.connection.HTTPSConnection obj>WARNING: Retrying (Retry(total=2, connect=None, read=None, redirect=None, status=None)) after connection broken by 'NewConnectionError('<pip._vendor.urllib3.connection.HTTPSConnection obj>WARNING: Retrying (Retry(total=1, connect=None, read=None, redirect=None, status=None)) after connection broken by 'NewConnectionError('<pip._vendor.urllib3.connection.HTTPSConnection obj>WARNING: Retrying (Retry(total=0, connect=None, read=None, redirect=None, status=None)) after connection broken by 'NewConnectionError('<pip._vendor.urllib3.connection.HTTPSConnection obj>ERROR: Could not find a version that satisfies the requirement pytest-runner
ERROR: No matching distribution found for pytest-runner

Probably missing pytestrunner from nativeBuildInputs.

@siraben
Copy link
Member Author

siraben commented Jan 1, 2021

Probably missing pytestrunner from nativeBuildInputs.

Is this on darwin or linux?

@siraben
Copy link
Member Author

siraben commented Jan 1, 2021

Result of nixpkgs-review pr 104758 run on x86_64-darwin 1

2 packages built:
  • python37Packages.vyper
  • vyper (python38Packages.vyper)

@SuperSandro2000
Copy link
Member

Probably missing pytestrunner from nativeBuildInputs.

Is this on darwin or linux?

should be both but I do not know anymore on which I ran it.

@SuperSandro2000
Copy link
Member

This is a semi-automatic executed nixpkgs-review. If you find some bugs or got suggestions for further things to search or run please reach out to SuperSandro2000 on IRC.

Result of nixpkgs-review pr 104758 run on x86_64-linux 1

2 packages built:
  • python37Packages.vyper
  • vyper (python38Packages.vyper)

@SuperSandro2000
Copy link
Member

Result of nixpkgs-review pr 104758 run on x86_64-darwin 1

2 packages built:
  • python37Packages.vyper
  • vyper (python38Packages.vyper)

Co-authored-by: Sandro <sandro.jaeckel@gmail.com>
@SuperSandro2000
Copy link
Member

Please squash the commits together.

@SuperSandro2000
Copy link
Member

This is a semi-automatic executed nixpkgs-review which does not build all packages (e.g. lumo, tensorflow or pytorch)
If you find some bugs or got suggestions for further things to search or run please reach out to SuperSandro2000 on IRC.

Result of nixpkgs-review pr 104758 run on x86_64-darwin 1

2 packages built:
  • python37Packages.vyper
  • vyper (python38Packages.vyper)

@SuperSandro2000
Copy link
Member

This is a semi-automatic executed nixpkgs-review which does not build all packages (e.g. lumo, tensorflow or pytorch)
If you find some bugs or got suggestions for further things to search or run please reach out to SuperSandro2000 on IRC.

Result of nixpkgs-review pr 104758 run on x86_64-linux 1

2 packages built:
  • python37Packages.vyper
  • vyper (python38Packages.vyper)

@SuperSandro2000 SuperSandro2000 merged commit e9b6e53 into NixOS:master Jan 11, 2021
@siraben siraben deleted the vyper branch January 11, 2021 01:04
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants