emesik / cardano-python

Python module for handling Cardano cryptocurrency
BSD 3-Clause "New" or "Revised" License
114 stars 17 forks source link

Cannot install package from PyPi #6

Closed DDevine closed 3 years ago

DDevine commented 3 years ago

Hi,

When I try to install the package in an fresh virtual environment using Python 3.9.6 on Arch Linux (and in an Ubuntu container) I get the following error.

$ pip install cardano
Collecting cardano
  Downloading cardano-0.6.tar.gz (16 kB)
    ERROR: Command errored out with exit status 1:
     command: [redacted]/test/.venv/bin/python -c 'import io, os, sys, setuptools, tokenize; sys.argv[0] = '"'"'/tmp/pip-install-2q37lbhj/cardano_f0eda82c5df746bb99a3d54c84674df4/setup.py'"'"'; __file__='"'"'/tmp/pip-install-2q37lbhj/cardano_f0eda82c5df746bb99a3d54c84674df4/setup.py'"'"';f = getattr(tokenize, '"'"'open'"'"', open)(__file__) if os.path.exists(__file__) else io.StringIO('"'"'from setuptools import setup; setup()'"'"');code = f.read().replace('"'"'\r\n'"'"', '"'"'\n'"'"');f.close();exec(compile(code, __file__, '"'"'exec'"'"'))' egg_info --egg-base /tmp/pip-pip-egg-info-2khwrj5_
         cwd: /tmp/pip-install-2q37lbhj/cardano_f0eda82c5df746bb99a3d54c84674df4/
    Complete output (5 lines):
    Traceback (most recent call last):
      File "<string>", line 1, in <module>
      File "/tmp/pip-install-2q37lbhj/cardano_f0eda82c5df746bb99a3d54c84674df4/setup.py", line 33, in <module>
        install_requires = open('requirements.txt', 'r').read().splitlines(),
    FileNotFoundError: [Errno 2] No such file or directory: 'requirements.txt'

    ...

Pip then attempts to install previous versions and they all seem to fail with the same error.

I suspect the issue is that requirements.txt is not included in the package when it is built due to it not being an automatically discovered Python file. I have not tried installing from source yet, or modifying the setup.py to include requirements.txt in package_data or to use a MANIFEST.in.

emesik commented 3 years ago

Thanks for pointing that out. Version 0.6.1 is already available and fixes that.