Closed furrycatherder closed 5 years ago
Hi, thank you for reporting the issue. In case you have not done so, please install the current version of pypi2nix from master
on your machine and try again. Many improvements have been made. You can install the current master
version of pypi2nix on your machine via
nix-env -if https://github.com/nix-community/pypi2nix/tarball/master
I'm getting a different error about a missing dependency now (argh). There might not be anything y'all can do about this since the dependency, flit, seems to require Python 3. I wonder how pypi2nix was getting past this step before, though:
DEBUG: Collecting ptyprocess>=0.5
DEBUG: Downloading https://files.pythonhosted.org/packages/7d/2d/e4b8733cf79b7309d84c9081a4ab558c89d8c89da5961bf4ddb050ca1ce0/ptyprocess-0.6.0.tar.gz (70kB)
DEBUG: Saved /tmp/pypi2nix/12fd924a15a80e13d1ed1c98ad9b6452/download/ptyprocess-0.6.0.tar.gz
DEBUG: Installing build dependencies: started
DEBUG: Installing build dependencies: finished with status 'error'
ERROR: Command errored out with exit status 1:
command: /nix/store/6nz66xsx5nmk5dcbf154xfnx6j30qxng-python-2.7.16/bin/python2.7 /nix/store/apirn6z59n6d1m862xb722sj32x10mhd-pypi2nix-bootstrap/base/pip install --ignore-installed --no-user --prefix /run/user/1000/pip-build-env-P7GLyp/overlay --no-warn-script-location --no-binary :all: --only-binary :none: -i https://pypi.org/simple --find-links file:///tmp/pypi2nix/12fd924a15a80e13d1ed1c98ad9b6452/cache/download --find-links file:///nix/store/apirn6z59n6d1m862xb722sj32x10mhd-pypi2nix-bootstrap/index -- flit
cwd: None
Complete output (4 lines):
DEPRECATION: Python 2.7 will reach the end of its life on January 1st, 2020. Please upgrade your Python as Python 2.7 won't be maintained after that date. A future version of pip will drop support for Python 2.7. More details about Python 2 support in pip, can be found at https://pip.pypa.io/en/latest/development/release-process/#python-2-support
Looking in links: file:///tmp/pypi2nix/12fd924a15a80e13d1ed1c98ad9b6452/cache/download, file:///nix/store/apirn6z59n6d1m862xb722sj32x10mhd-pypi2nix-bootstrap/index
ERROR: Could not find a version that satisfies the requirement flit (from versions: none)
ERROR: No matching distribution found for flit
----------------------------------------
ERROR: Command errored out with exit status 1: /nix/store/6nz66xsx5nmk5dcbf154xfnx6j30qxng-python-2.7.16/bin/python2.7 /nix/store/apirn6z59n6d1m862xb722sj32x10mhd-pypi2nix-bootstrap/base/pip install --ignore-installed --no-user --prefix /run/user/1000/pip-build-env-P7GLyp/overlay --no-warn-script-location --no-binary :all: --only-binary :none: -i https://pypi.org/simple --find-links file:///tmp/pypi2nix/12fd924a15a80e13d1ed1c98ad9b6452/cache/download --find-links file:///nix/store/apirn6z59n6d1m862xb722sj32x10mhd-pypi2nix-bootstrap/index -- flit Check the logs for full command output.
Give this a try with master version, it might work.
pypi2nix -v -V 2.7 -E libffi -E openssl -r requirements.txt -s flit
But no guarantees
❯ pypi2nix -v -V 2.7 -E libffi -E openssl -r requirements.txt -s flit
DEBUG: |-> nix-shell --pure /tmp/tmpcxowndg2 --command 'python -c "from platform import python_version; print(python_version())"'
DEBUG: 2.7.16
INFO: pypi2nix v2.0.0
INFO: running ...
INFO: Stage1: Downloading wheels and creating wheelhouse ...
DEBUG: |-> nix-instantiate --eval --expr 'let pkgs = import <nixpkgs> {}; in ""'
DEBUG: ""
DEBUG: |-> nix-shell --argstr download_cache_dir /tmp/pypi2nix/12fd924a15a80e13d1ed1c98ad9b6452/cache/download --arg extra_build_inputs '[ "libffi" "openssl" ]' --argstr project_dir /tmp/pypi2nix/12fd924a15a80e13d1ed1c98ad9b6452 --argstr python_version python27Full --argstr extra_env '' --arg requirements_files '[ "/tmp/pypi2nix/12fd924a15a80e13d1ed1c98ad9b6452/768fd80997d4154713c8e22ec1eb2bb2.txt" ]' --argstr destination_directory /tmp/pypi2nix/12fd924a15a80e13d1ed1c98ad9b6452/download --argstr editable_sources_directory /tmp/pypi2nix/12fd924a15a80e13d1ed1c98ad9b6452/editable_sources --argstr build_directory /tmp/pypi2nix/12fd924a15a80e13d1ed1c98ad9b6452/build --pure /nix/store/8q79gjclj6awf4fl4x7dlfgcc38sp2xs-python3.7-pypi2nix-2.0.0/lib/python3.7/site-packages/pypi2nix/pip/download.nix --command exit
DEPRECATION: Python 2.7 will reach the end of its life on January 1st, 2020. Please upgrade your Python as Python 2.7 won't be maintained after that date. A future version of pip will drop support for Python 2.7. More details about Python 2 support in pip, can be found at https://pip.pypa.io/en/latest/development/release-process/#python-2-support
DEBUG: Looking in links: file:///tmp/pypi2nix/12fd924a15a80e13d1ed1c98ad9b6452/cache/download, file:///nix/store/apirn6z59n6d1m862xb722sj32x10mhd-pypi2nix-bootstrap/index
ERROR: Could not find a version that satisfies the requirement flit (from -r /tmp/pypi2nix/12fd924a15a80e13d1ed1c98ad9b6452/768fd80997d4154713c8e22ec1eb2bb2.txt (line 1)) (from versions: none)
ERROR: No matching distribution found for flit (from -r /tmp/pypi2nix/12fd924a15a80e13d1ed1c98ad9b6452/768fd80997d4154713c8e22ec1eb2bb2.txt (line 1))
ERROR: Looking in links: file:///tmp/pypi2nix/12fd924a15a80e13d1ed1c98ad9b6452/cache/download, file:///nix/store/apirn6z59n6d1m862xb722sj32x10mhd-pypi2nix-bootstrap/index
Do you want to report above issue (a browser will open with prefilled details of issue)? [y/N]:
Error: While trying to run the command something went wrong.
Okay, it looks to me as if ptyprocess
wants to use flit
which is not available for python 2 :(
I went and checked the source code of ptyprocess
and the latest version not requiring flit
seems to be 0.5. The I tried the following:
[nix-shell:~/src/pypi2nix/testing]$ pypi2nix -e ptyprocess==0.5 -V 2.7
INFO: pypi2nix v2.0.0
INFO: running ...
INFO: Stage1: Downloading wheels and creating wheelhouse ...
DEPRECATION: Python 2.7 will reach the end of its life on January 1st, 2020. Please upgrade your Python as Python 2.7 won't be maintained after that date. A future version of pip will drop support for Python 2.7. More details about Python 2 support in pip, can be found at https://pip.pypa.io/en/latest/development/release-process/#python-2-support
DEPRECATION: Python 2.7 will reach the end of its life on January 1st, 2020. Please upgrade your Python as Python 2.7 won't be maintained after that date. A future version of pip will drop support for Python 2.7. More details about Python 2 support in pip, can be found at https://pip.pypa.io/en/latest/development/release-process/#python-2-support
DEPRECATION: Python 2.7 will reach the end of its life on January 1st, 2020. Please upgrade your Python as Python 2.7 won't be maintained after that date. A future version of pip will drop support for Python 2.7. More details about Python 2 support in pip, can be found at https://pip.pypa.io/en/latest/development/release-process/#python-2-support
INFO: Stage2: Extracting metadata from pypi.python.org ...
WARNING: Couldn't recognize license `UNKNOWN` for `ptyprocess`
INFO: Stage3: Generating Nix expressions ...
INFO:
INFO: Nix expressions generated successfully.
INFO:
INFO: To start development run:
INFO: nix-shell requirements.nix -A interpreter
INFO:
INFO: More information you can find at
INFO: https://github.com/nix-community/pypi2nix
Which seemed to work. So adding ptyprocess==0.5
to your requirements file might work to solve this specific problem.
It completed successfully, thank you. 🙂
I encourage you to open a new issue if you run into additional problems. Thanks again for reporting
requirements.txt: