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

Add setuptools to pip-package in Makefile #970

Merged
merged 2 commits into from
Aug 21, 2024
Merged

Conversation

rickecon
Copy link
Member

This PR adds pip install setuptools to the pip-package section of Makefile. This is because the publish_to_pypi.yml GH Action stopped working when we moved to Python 3.12 in PR #969. The error traceback on this GH Action that only runs when a PR is merged is the following. I found in this description of What's new in Python 3.12 that this version stopped including the setuptools and wheel packages. For this reason, I think the solution is to just add the pip install setuptools line to the pip-package section of Makefile. Whether this works can only be tested by merging this PR and seeing if the ogcore Python package automatically loads to PyPI.org afterward.

Run make pip-package
  make pip-package
  shell: /usr/bin/bash -e {0}
  env:
    pythonLocation: /opt/hostedtoolcache/Python/3.1[2](https://github.com/PSLmodels/OG-Core/actions/runs/10479180751/job/29024292988#step:5:2).4/x64
    PKG_CONFIG_PATH: /opt/hostedtoolcache/Python/[3](https://github.com/PSLmodels/OG-Core/actions/runs/10479180751/job/29024292988#step:5:3).12.4/x64/lib/pkgconfig
    Python_ROOT_DIR: /opt/hostedtoolcache/Python/3.12.[4](https://github.com/PSLmodels/OG-Core/actions/runs/10479180751/job/29024292988#step:5:4)/x64
    Python2_ROOT_DIR: /opt/hostedtoolcache/Python/3.12.4/x64
    Python3_ROOT_DIR: /opt/hostedtoolcache/Python/3.12.4/x64
    LD_LIBRARY_PATH: /opt/hostedtoolcache/Python/3.12.4/x64/lib
pip install wheel
Collecting wheel
  Downloading wheel-0.44.0-py3-none-any.whl.metadata (2.3 kB)
Downloading wheel-0.44.0-py3-none-any.whl (67 kB)
Installing collected packages: wheel
Successfully installed wheel-0.44.0
python setup.py sdist bdist_wheel
Traceback (most recent call last):
  File "/home/runner/work/OG-Core/OG-Core/setup.py", line 1, in <module>
    import setuptools
ModuleNotFoundError: No module named 'setuptools'
make: *** [Makefile:7[5](https://github.com/PSLmodels/OG-Core/actions/runs/10479180751/job/29024292988#step:5:5): pip-package] Error 1
Error: Process completed with exit code 2.

@jdebacker

@rickecon rickecon merged commit 92f7594 into PSLmodels:master Aug 21, 2024
1 check passed
@rickecon rickecon deleted the load branch August 21, 2024 01:39
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.

1 participant