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

python3 setup.py sdist does not create an installable archive #84

Open
0xDEC0DE opened this issue Jun 6, 2024 · 1 comment
Open

python3 setup.py sdist does not create an installable archive #84

0xDEC0DE opened this issue Jun 6, 2024 · 1 comment

Comments

@0xDEC0DE
Copy link

0xDEC0DE commented Jun 6, 2024

Steps to reproduce

curl -fLO https://github.com/confluentinc/confluent-docker-utils/archive/refs/tags/v0.0.78.tar.gz
tar xzf v0.0.78.tar.gz
cd confluent-docker-utils-0.0.78/
python3 setup.py sdist
pip3 install dist/confluent-docker-utils-0.0.78.tar.gz

Expected result

All requirements are downloaded, and the package installs

Actual behavior

Processing ./dist/confluent-docker-utils-0.0.78.tar.gz
    ERROR: Command errored out with exit status 1:
     command: /usr/bin/python3.9 -c 'import sys, setuptools, tokenize; sys.argv[0] = '"'"'/tmp/pip-req-build-wul03re5/setup.py'"'"'; __file__='"'"'/tmp/pip-req-build-wul03re5/setup.py'"'"';f=getattr(tokenize, '"'"'open'"'"', open)(__file__);code=f.read().replace('"'"'\r\n'"'"', '"'"'\n'"'"');f.close();exec(compile(code, __file__, '"'"'exec'"'"'))' egg_info --egg-base /tmp/pip-pip-egg-info-05dl5x3l
         cwd: /tmp/pip-req-build-wul03re5/
    Complete output (5 lines):
    Traceback (most recent call last):
      File "<string>", line 1, in <module>
      File "/tmp/pip-req-build-wul03re5/setup.py", line 15, in <module>
        install_requires=open('requirements.txt').read(),
    FileNotFoundError: [Errno 2] No such file or directory: 'requirements.txt'
    ----------------------------------------
ERROR: Command errored out with exit status 1: python setup.py egg_info Check the logs for full command output.

Miscellany

python3 setup.py install DOES claim to work, but running cub and dub afterward yields:

Traceback (most recent call last):
  File "/usr/local/bin/cub", line 33, in <module>
    sys.exit(load_entry_point('confluent-docker-utils==0.0.78', 'console_scripts', 'cub')())
  File "/usr/local/bin/cub", line 25, in importlib_load_entry_point
    return next(matches).load()
  File "/usr/lib64/python3.9/importlib/metadata.py", line 86, in load
    module = import_module(match.group('module'))
  File "/usr/lib64/python3.9/importlib/__init__.py", line 127, in import_module
    return _bootstrap._gcd_import(name[level:], package, level)
  File "<frozen importlib._bootstrap>", line 1030, in _gcd_import
  File "<frozen importlib._bootstrap>", line 1007, in _find_and_load
  File "<frozen importlib._bootstrap>", line 972, in _find_and_load_unlocked
  File "<frozen importlib._bootstrap>", line 228, in _call_with_frames_removed
  File "<frozen importlib._bootstrap>", line 1030, in _gcd_import
  File "<frozen importlib._bootstrap>", line 1007, in _find_and_load
  File "<frozen importlib._bootstrap>", line 984, in _find_and_load_unlocked
ModuleNotFoundError: No module named 'confluent.docker_utils'
@0xDEC0DE
Copy link
Author

0xDEC0DE commented Jun 6, 2024

This can be trivially fixed by adding a MANIFEST.in file to the project.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant