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

Cannot add . or -e . to setup.py/setup.cfg install_requires/extras_require #1482

Closed
adamcunnington-gdt opened this issue Sep 8, 2021 · 2 comments

Comments

@adamcunnington-gdt
Copy link

I can't reference . or -e . in install_requires/extras_require in setup.py/setup.cfg. I get the following error:
subprocess.CalledProcessError: Command '['.venv/bin/python3.9', '.venv/lib/python3.9/site-packages/pep517/in_process/_in_process.py', 'get_requires_for_build_wheel', '/tmp/tmptqvo2r5o']' returned non-zero exit status 1.

I believe my workflow is not that unorthodox:

  • I list all of my direct, unpinned dependencies in setup.cfg - I put regular requirements in install_requires and dev requirements in extras_require/dev
  • I then run pip-compile and pip-compile --extra dev --output-file dev-requirements.txt which freezes requirements.
  • I need to install setup.py as well as I have console scripts defined in there. If I was using requirements.in or dev-requirements.in, I would just add . and -e . respectively. I figured I should be able to do the same from install_requires/extras_require but I cannot.

I'm not sure if this is a bug or feature request.

@AndydeCleyre
Copy link
Contributor

Wouldn't that be defining a package as dependent on itself? Without using pip-tools, does pip install a package defined like that?

Yeah I would, in addition to your setup files, have *.in files with . and -e .[dev].

@RonnyPfannschmidt
Copy link
Member

using . or -e . in install_requires/extras_require is

  • intentionally not supported by setuptools
  • not at all a part of pip-tools - the error you see is from setuptools itself as the local package cant be built

as feature request it could perhaps be sensible to include a way to add a extra requirement as the feature was added in #1363
the feature should have a extra flag to ensure a editable/install action is added to the requirement itself

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

3 participants