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

Ensure git archives contains version info #1405

Merged

Conversation

carlsmedstad
Copy link
Contributor

Using setuptools-scm to resolve the version of a source archive is not possible unless that information is exported during the archival process. This creates issues for downstream packagers as they must manually add version information in their packages or switch to another source.

See https://github.com/pypa/setuptools_scm/#git-archive for more information.

Using setuptools-scm to resolve the version of a source archive is not
possible unless that information is exported during the archival
process. This creates issues for downstream packagers as they must
manually add version information in their packages or switch to another
source.

See https://github.com/pypa/setuptools_scm/#git-archive for more
information.
@brandonwillard brandonwillard added enhancement New feature or request dependencies Pull requests that update a dependency file setup and installation Relates to the setup and installation of Aesara labels Feb 5, 2023
@brandonwillard brandonwillard requested a review from maresb February 5, 2023 00:10
@brandonwillard
Copy link
Member

brandonwillard commented Feb 5, 2023

I'm not very familiar with this feature. How would people use it with Aesara?. Nevermind; I see now.

@maresb
Copy link
Contributor

maresb commented Feb 5, 2023

Thanks a lot for pointing this out! Looks like I missed this when I switched over to setuptools_scm. Tentatively it looks good, but I am currently AFK but will try and take a closer look within a day or so. (Feel free to ping me.)

@brandonwillard brandonwillard merged commit 6061995 into aesara-devs:main Feb 5, 2023
@brandonwillard
Copy link
Member

@carlsmedstad, many thanks!

@maresb
Copy link
Contributor

maresb commented Feb 5, 2023

@carlsmedstad, for both my own understanding, and for testing, would you be willing to explain more about your particular use case?

When transitioning to setuptools_scm, I was focused on the PyPI-published sdist. In that case, the version is exported both in the metadata (PKG_INFO) and in aesara/_version.py. Do you have some sort of custom git archive workflow? Or are you using the GitHub-published archive associated with the release? In these cases I see that indeed no version info was being exported, and now that we have this PR, we should probably be testing for this.

Thanks again for bringing this to our attention!

@carlsmedstad
Copy link
Contributor Author

Your're welcome!

I maintain a few packages in the Arch User Repository (AUR) one of which is for Aesara. My preferred packaging workflow is to use the git archive from a GitHub/GitLab release as the source. The main reasons for this is that:

  • This source is language agnostic. I maintain software built in Python, Go, C, etc. and would like to reuse as much as possible between packages.
  • This works well with Watch -> Custom -> Releases notifications. When I get an email about a new release I know the source for the new version is available.

Hopefully that explains my use case and my reasons for it :)

@maresb
Copy link
Contributor

maresb commented Feb 5, 2023

That makes a lot of sense. Thank you for the explanation, and also thanks for repackaging Aesara!

I'll make sure to add a test around the git archive, and please do reach out again in case you run into any further issues or have other suggestions.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
dependencies Pull requests that update a dependency file enhancement New feature or request setup and installation Relates to the setup and installation of Aesara
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants