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

Session errors out while installing a hatchling based library in editable mode #638

Closed
Saransh-cpp opened this issue Jul 25, 2022 · 1 comment
Labels

Comments

@Saransh-cpp
Copy link

Current Behavior

I am running nox with a hatchling based repository (vector), which does not require a setup.py file. nox errors out on some specific Python versions with the following message -

D:\OpenSource\HEP\vector>nox -s tests
nox > Running session tests-3.6
nox > Re-using existing virtual environment at .nox\tests-3-6.
nox > python -m pip install -e '.[awkward,test,test-extras]'
nox > Command python -m pip install -e '.[awkward,test,test-extras]' failed with exit code 1:
ERROR: File "setup.py" not found. Directory cannot be installed in editable mode: D:\OpenSource\HEP\vector
(A "pyproject.toml" file was found, but editable mode currently requires a setup.py based build.)
WARNING: You are using pip version 20.3.3; however, version 21.3.1 is available.
You should consider upgrading via the 'D:\OpenSource\HEP\vector\.nox\tests-3-6\Scripts\python.EXE -m pip install --upgrade pip' command.
nox > Session tests-3.6 failed.
nox > Running session tests-3.7
nox > Session tests-3.7 skipped: Python interpreter 3.7 not found.
nox > Running session tests-3.8
nox > Re-using existing virtual environment at .nox\tests-3-8.
nox > python -m pip install -e '.[awkward,test,test-extras]'
nox > Command python -m pip install -e '.[awkward,test,test-extras]' failed with exit code 1:
ERROR: File "setup.py" not found. Directory cannot be installed in editable mode: D:\OpenSource\HEP\vector
(A "pyproject.toml" file was found, but editable mode currently requires a setup.py based build.)
WARNING: You are using pip version 20.3.3; however, version 22.2 is available.
You should consider upgrading via the 'D:\OpenSource\HEP\vector\.nox\tests-3-8\Scripts\python.EXE -m pip install --upgrade pip' command.
nox > Session tests-3.8 failed.
nox > Running session tests-3.9
nox > Re-using existing virtual environment at .nox\tests-3-9.
nox > python -m pip install -e '.[awkward,test,test-extras]'
nox > pytest
.
.
.
.
========================================================== 340 passed, 2408 skipped in 6.58s =========================================================== 
nox > Session tests-3.9 was successful.
nox > Running session tests-3.10
nox > Session tests-3.10 skipped: Python interpreter 3.10 not found.
nox > Ran multiple sessions:
nox > * tests-3.6: failed
nox > * tests-3.7: skipped
nox > * tests-3.8: failed
nox > * tests-3.9: success
nox > * tests-3.10: skipped

The last portion (Python 3.9) goes ahead and runs the tests successfully. I have not attached that part as it seemed irrelevant.
Here is my noxfile - https://github.com/scikit-hep/vector/blob/main/noxfile.py

Expected Behavior

Allow editable installs for hatchling based projects.

Steps To Reproduce

  1. Clone a hatchling based Python library
  2. Run the tests

Environment

- OS: Windows 10
- Python: I primarily use `3.9` but the error seems to be originating with different `Python` versions.
- Nox: 2022.1.7

Anything else?

No response

@Saransh-cpp
Copy link
Author

False alarm.

This worked after updating the failing Python's pip version using -

D:\OpenSource\HEP\vector\.nox\tests-3-6\Scripts\python.EXE -m pip install --upgrade pip

@DiddiLeija DiddiLeija closed this as not planned Won't fix, can't repro, duplicate, stale Jul 26, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Development

No branches or pull requests

2 participants