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

Use setuptools-scm to ensure all repo files are in sdist #235

Merged
merged 1 commit into from
Jun 4, 2024

Conversation

wshanks
Copy link
Collaborator

@wshanks wshanks commented Jun 3, 2024

Listing setuptools_scm in pyproject.toml enables it to be used to determine which files are included in the sdist instead of the older MANIFEST.in procedure. setuptools_scm just includes every file tracked by git which seems fine for this small project.

Additionally, delete INSTALL.txt which had outdated installation information.

Listing `setuptools_scm` in `pyproject.toml` enables it to be used to
determine which files are included in the sdist instead of the older
`MANIFEST.in` procedure. `setuptools_scm` just includes every file
tracked by `git` which seems fine for this small project.

Additionally, delete `INSTALL.txt` which had outdated installation
information.
@wshanks
Copy link
Collaborator Author

wshanks commented Jun 3, 2024

Closes #234

Copy link

codecov bot commented Jun 3, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 95.79%. Comparing base (3c3853d) to head (c0e80cf).

Additional details and impacted files
@@            Coverage Diff             @@
##           master     #235      +/-   ##
==========================================
+ Coverage   95.74%   95.79%   +0.05%     
==========================================
  Files          12       12              
  Lines        1903     1903              
==========================================
+ Hits         1822     1823       +1     
+ Misses         81       80       -1     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@mgorny
Copy link

mgorny commented Jun 3, 2024

Thanks. I can confirm that with this change, python -m build -s includes all files in sdist.

@newville
Copy link
Member

newville commented Jun 4, 2024

@wshanks Thanks -- we could also use this to set the version number from the git tag, as will

  • pyproject.toml:
    add
[tool.setuptools_scm]
write_to = "uncertainties/version.py"
version_scheme = "post-release"

and remove

version = "3.2.0"
  • uncertainties/__init__.py:

replace

# Numerical version:
__version_info__ = (3, 2, 0)
__version__ = '.'.join(map(str, __version_info__))

with

from .version import version as __version__

It would be OK with me to postpone this until later.

@wshanks wshanks merged commit 7cea5a9 into lmfit:master Jun 4, 2024
20 checks passed
@wshanks wshanks deleted the setuptools-scm-sdist branch June 4, 2024 03:50
@wshanks
Copy link
Collaborator Author

wshanks commented Jun 4, 2024

I like the idea of using setuptools-scm to manage the version. I will look into doing that in a later PR.

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.

3 participants