-
Notifications
You must be signed in to change notification settings - Fork 7
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
Migrate setup configuration to pyproject.toml
#175
Conversation
2dc5f05
to
50d84c3
Compare
TestingI tested this by running: conda activate base
conda config --add channels conda-forge
conda config --set channel_priority strict
conda create -y -n mache_dev --file spec-file.txt
conda activate mache_dev
python -m pip install . and then testing the installation by running: mache --help
mache sync --help
mache --version all of which had the expected output. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hmm, something isn't quite working right with finding the package and adding the package data. If I run:
$ mache sync diags --help
I see:
Traceback (most recent call last):
File "/gpfs/fs1/home/ac.xylar/chrysalis/miniforge3/envs/mache_dev/bin/mache", line 5, in <module>
from mache.__main__ import main
File "/gpfs/fs1/home/ac.xylar/chrysalis/miniforge3/envs/mache_dev/lib/python3.12/site-packages/mache/__main__.py", line 5, in <module>
from mache import sync
ImportError: cannot import name 'sync' from 'mache' (/gpfs/fs1/home/ac.xylar/chrysalis/miniforge3/envs/mache_dev/lib/python3.12/site-packages/mache/__init__.py)
If I look at:
$ ls /gpfs/fs1/home/ac.xylar/chrysalis/miniforge3/envs/mache_dev/lib/python3.12/site-packages/mache/
discover.py machine_info.py permissions.py version.py
__init__.py __main__.py __pycache__
it seems like only the python files directly in mache
are there and not the subdirectories or their contents.
50d84c3
to
e99e41e
Compare
The latest changes all look great! I'll test it one more time tomorrow (today already!) and merge if the tests work out. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yep, everything worked great for me this time. I installed the package with:
conda create -y -n mache_dev --file spec-file.txt
conda activate mache_dev
python -m pip install .
Then, the following worked as expected:
mache sync diags --help
and each of these directories had the expected non-python files:
ls /gpfs/fs1/home/ac.xylar/chrysalis/miniforge3/envs/mache_dev/lib/python3.12/site-packages/mache/cime_machine_config/
ls /gpfs/fs1/home/ac.xylar/chrysalis/miniforge3/envs/mache_dev/lib/python3.12/site-packages/mache/machines/
ls /gpfs/fs1/home/ac.xylar/chrysalis/miniforge3/envs/mache_dev/lib/python3.12/site-packages/mache/spack/
@altheaden, very nice work! |
In this PR I migrated the setup configurations that were previously in
setup.cfg
,setup.py
, andMANIFEST.in
into a singlepyproject.toml
file. The only exception is the configurations forflake8
, since it does not yet supportpyproject.toml
configuration, so its config options have been moved into a new file,.flake8
.Checklist
Testing
comment in the PR documents testing used to verify the changes