-
Notifications
You must be signed in to change notification settings - Fork 112
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
Simplify creating of the source tarball #2145
Comments
As part of this we should probably review the content of the tarball and remove anything not needed. For example, we could re-consider whether it makes sense to include |
There seem to be multiple options how to do the building itself: From the
@happz, @martinhoyer, @lukaszachy, @thrix, would be probably good sit down together for a few minutes and discuss what would be needed and what should be the next steps, hm? |
You don't need to use build and github actions (or twine).
A simple example of my workflow with hatch:
|
You mean running locally? We would like to connect it with the |
In CI. Not very sophisticated I admit :) gitlab-ci:
Not sure how github secrets work, I made it work in gitlab by using HATCH_INDEX_USER and HATCH_INDEX_AUTH protected variables. |
Leaving a few notes about the package managers/build-backends. .. Flit
Hatch
Standardized "lockfile" format was rejected in PEP-665 with more discussion here Poetry
PDM
setuptools
|
In our team, we use the versioneer project to inject the current version into a build. It reads version tags directly from git and concatenates |
Note that in order to support F36 and rhel9, pep621 does not work. Packit chose hatchling for this reason. And since tmt uses click, the man files can be generated with click-man. Packit also moved some files to About uploading to PyPI, actually there is a new recommendation for that that gets rid of secrets usage. |
I assume you refer to rhel-9 having python3-setuptools-53.0.0-12 rpm, while PEP-621 requires >= 61.0.0? Good point though. hatchling, flit-core and pdm-pep517 are PEP-621-compatible backends and are in el9 EPEL. @psss I'm not 100% clear about how the rpm packaging works here, but presume Packit stopped building for epel8, after switching to hatchling. If you want to preserve el8 compatibility, flit might be the only choice then. |
Good point. By the time that was implemented, packit had already stopped updating rhel8 due to various incompatibilities. Last rhel8 build is Here is the comment on packit regarding a few bakends. |
Very nice comment, +1
I've played a little with el8, py36 and flit today, the wheel, sdist builds fine, but the problem with rpm building is actually pyproject-rpm-macros(or lack of compatible version). It can sort of be done with some horrible hacks, but what's the point... So, if we want to keep building el8 rpms, we cannot get rid of setup.py. I'm happy to work on this if we go the pep-621-way fwiw. |
* Store all project metadata in `pyproject.toml` * Use hatchling build backend, hatch workflow, vcs-versioning * Refactor specfile with the latest Fedora packaging guidelines Fixes teemtee#2145 Co-authored-by: Petr Šplíchal <psplicha@redhat.com>
* Store all project metadata in `pyproject.toml` * Use hatchling build backend, hatch workflow, vcs-versioning * Refactor specfile with the latest Fedora packaging guidelines Fixes teemtee#2145 Co-authored-by: Petr Šplíchal <psplicha@redhat.com>
Currently
Makefile
takes care of preparing the source tarball. Only relevant files from the git repository are selected and packaged. Several custom adjustments are done before creating the archive:tmt/__init__.py
README.rst
anddoc/header.txt
Because of this we currently need to upload the tarball to github release attachments. It would be nice, if this manual step is removed. The most straightforward way seems to be to use the
%pypi_source
macro in spec file and upload the archive to pypi. This means thatpython -m build
should be used to prepare the archive (take care of selecting the needed files and apply our custom adjustments). Here are some related links:As this will require changes to
setup.py
we could use this opportunity to get rid of it and migrate all python building configuration topyproject.toml
.The text was updated successfully, but these errors were encountered: