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

pyproject.toml: add dynamic requirements from file #71

Merged
merged 3 commits into from
Aug 21, 2023

Conversation

scottstanie
Copy link
Collaborator

Testing out the dynamic requirements, we'll see if the build works alright with the "setuptools<60.0" pin.

Copy link
Member

@yunjunz yunjunz left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thank you @scottstanie. While testing the installation as below, the extra docs,test is not recognized. Am I using the correct syntax?

Related, could you update the installation note for this as well? I assume people who build from source would like to know how to install the extra dependencies optionally.

(test_pysolid) yunjunz:~/tools/PySolid>$ python -m pip install -e .[docs,test]
Obtaining file:///Users/yunjunz/tools/PySolid
  Installing build dependencies ... done
  Checking if build backend supports build_editable ... done
  Getting requirements to build wheel ... done
  Preparing metadata (pyproject.toml) ... done
WARNING: pysolid 0.3.0.post10 does not provide the extra 'docs'
WARNING: pysolid 0.3.0.post10 does not provide the extra 'test'
Requirement already satisfied: numpy in /Users/yunjunz/tools/mambaforge/envs/test_pysolid/lib/python3.11/site-packages (from pysolid==0.3.0.post10) (1.25.2)
Requirement already satisfied: scipy in /Users/yunjunz/tools/mambaforge/envs/test_pysolid/lib/python3.11/site-packages (from pysolid==0.3.0.post10) (1.11.2)
Installing collected packages: pysolid
  Attempting uninstall: pysolid
    Found existing installation: pysolid 0.3.0.post10
    Uninstalling pysolid-0.3.0.post10:
      Successfully uninstalled pysolid-0.3.0.post10
  Running setup.py develop for pysolid
Successfully installed pysolid-0.3.0.post10

pyproject.toml Outdated Show resolved Hide resolved
@yunjunz yunjunz requested a review from jhkennedy August 21, 2023 02:32
@yunjunz yunjunz linked an issue Aug 21, 2023 that may be closed by this pull request
Co-authored-by: Zhang Yunjun <yunjunz@outlook.com>
@scottstanie
Copy link
Collaborator Author

Thank you @scottstanie. While testing the installation as below, the extra docs,test is not recognized. Am I using the correct syntax?

No that does look correct, I'm checking again and I think I missed that warning the first time I tested it.

It's set up exactly the same as dolphin, so my only guess is that having a setup.py is overriding these sections of the pyproject... I'll check if I can find a workaround, but otherwise we might need to have it in the setup.py and not the pyproject.toml

@scottstanie
Copy link
Collaborator Author

Oh no nevermind, it was related to my concern about "setuptools<60.0". When I flip that to "setuptools>=64.0", it recognizes .[docs] or .[docs,test].... but then the wheel build fails 🙀

Copy link
Member

@yunjunz yunjunz left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is getting annoying. Let's keep the current form, add a note saying the [docs] syntax won't work yet, and move on. We will deal with this in the pure Python version in the future.

@scottstanie
Copy link
Collaborator Author

That sounds good to me

@yunjunz
Copy link
Member

yunjunz commented Aug 21, 2023

I think we could safely merge this PR as all previous tests passed without issue (no need to wait for another 1 hour), we have only comments change after that.

If you think it's ready, could you cut a new release (version 0.3.1) after the PR?

Would you like to be added as a maintainer on the conda-forge repo? I forgot to ask you in the last PR.

@yunjunz yunjunz changed the title pyproject.toml: add dynamic requirements from file pyproject.toml: add dynamic requirements from file Aug 21, 2023
@scottstanie scottstanie merged commit 8c9dca3 into insarlab:main Aug 21, 2023
4 checks passed
@scottstanie scottstanie deleted the pyproject-dynamic-deps branch August 21, 2023 15:36
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

Successfully merging this pull request may close these issues.

pyproject.toml: specify dependencies dynamically with setuptool
2 participants