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

Potential installation failures #6

Closed
Madoshakalaka opened this issue Oct 18, 2019 · 2 comments
Closed

Potential installation failures #6

Madoshakalaka opened this issue Oct 18, 2019 · 2 comments
Labels
good first issue Good for newcomers wontfix This will not be worked on

Comments

@Madoshakalaka
Copy link

Hi I'm the author of pipenv-setup. I checked who's been using my thing and I got nosy :)

Have to say your current setup.py has problems with it.

https://pypi.org/project/mutapath/#files

You're building sdist (.tar.gz) and wheels.

In case of the wheel file there's no problem as it's compiled binary with specified dependencies. Setup.py has been already evaluated while building a wheel.

However when pip falls back to sdist file due to incompatible binary file. setup.py will be dynamically evaluated and you can't assume a user to have pipfile installed in order to parse the pipfile.lock. btw Pipfile.lock isn't packaged into your distribution either.

This is what happens:

computer:~$ python3 -m pip install ./mutapath-0.9.0.tar.gz
Processing ./mutapath-0.9.0.tar.gz
    ERROR: Complete output from command python setup.py egg_info:
    ERROR: Traceback (most recent call last):
      File "<string>", line 1, in <module>
      File "/tmp/pip-req-build-6trezlyr/setup.py", line 34, in <module>
        install_requires=get_dependencies(),
      File "/tmp/pip-req-build-6trezlyr/setup.py", line 11, in get_dependencies
        lock_data = json.load(pipfile_lock.open())
      File "/usr/lib/python3.7/pathlib.py", line 1186, in open
        opener=self._opener)
      File "/usr/lib/python3.7/pathlib.py", line 1039, in _opener
        return self._accessor.open(self, flags, mode)
    FileNotFoundError: [Errno 2] No such file or directory: 'Pipfile.lock'
    ----------------------------------------
ERROR: Command "python setup.py egg_info" failed with error code 1 in /tmp/pip-req-build-6trezlyr/

The only way to resolve this is to write pipfile parsing code with built-in dependencies and add Pipfile to your package_data keyword in setup.py

Or you can use my pipenv-setup and give me some feature requests if you have any ;)

@Madoshakalaka
Copy link
Author

you can add pipenv-setup sync to git pre-commit hook if automatic execution is really desired

@matfax
Copy link
Owner

matfax commented Oct 19, 2019

Hi @Madoshakalaka
Thank you for your feedback, I also noticed that the CI didn't build.
I tried various approaches to make it work and decided to read the Pipfile.lock in the setup.py.
After all, I also needed Dependabot to be compatible and even though Dependabot is able to recognize the setup.py, it doesn't accept both Pipfile and setup.py. It only pushes updates for one of both. Pre-commit hooks don't help there either.

Feel free to check, if you still see any issues with the setup.

@matfax matfax added good first issue Good for newcomers wontfix This will not be worked on labels Oct 19, 2019
@matfax matfax closed this as completed Oct 20, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
good first issue Good for newcomers wontfix This will not be worked on
Projects
None yet
Development

No branches or pull requests

2 participants