Skip to content

Conversation

@jeanas
Copy link
Contributor

@jeanas jeanas commented Nov 7, 2023

This reduces tox's setup time, as measured on an environment with no commands, from ~1.7s to ~0.8s.

It also fixes requirements.txt and tox.ini not being included in sdists in spite of being part of the source tree.

This reduces tox's setup time, as measured on an environment with no
commands, from ~1.7s to ~0.8s.

It also fixes requirements.txt and tox.ini not being included in sdists
in spite of being part of the source tree.
@birkenfeld
Copy link
Member

Feels definitely snappier. Is hatchling commonly enough used so that this doesn't create problems for downstream packagers?

@jeanas
Copy link
Contributor Author

jeanas commented Nov 9, 2023

Yes, hatchling is pretty popular these days. It's also used by some important projects like Jupyter, attrs and Black.

@birkenfeld
Copy link
Member

Good to go then!

@jeanas jeanas merged commit a01d1f2 into pygments:master Nov 10, 2023
@jeanas jeanas deleted the hatch branch November 10, 2023 18:39
@Anteru
Copy link
Collaborator

Anteru commented Nov 10, 2023

Ok, I just tried this and python -m build uses hatchling now (apparently without having to install anything manually), so that's good. Does this impact the build itself in any way? For me at the very least it changed the capitalization of the output files -- i.e. it produced lower-case pygments now. If you look at the release checklist, that breaks the command line there. I can obviously rename it manually, but is there a way to teach hatchling about this?

@jeanas
Copy link
Contributor Author

jeanas commented Nov 10, 2023

Ok, I just tried this and python -m build uses hatchling now (apparently without having to install anything manually), so that's good.

Yes, this is the “build isolation” feature — by default, build (and pip) create a fresh virtual environment and install the build dependencies (from build-system.requires) into it.

For me at the very least it changed the capitalization of the output files -- i.e. it produced lower-case pygments now.

Oh, that's right, good point. However, after looking into it, it seems that the consensus among packaging people is that normalizing the project name in sdist/wheel file names is better and setuptools should change to do it. See pypa/setuptools#3777

So let's just update the release procedure?

@jeanas
Copy link
Contributor Author

jeanas commented Nov 10, 2023

This PR apparently broke the WASM build of Pygments with Pyodide in the CI, but I don't understand why.

The error says

#9 71.01 OSError: Readme file does not exist: description.rst

@Anteru
Copy link
Collaborator

Anteru commented Nov 10, 2023

Lower-case is totally fine for me, it's just something that needs to be mentioned in the changelog because there must be someone out there using a script which expects it upper-case.

I don't know what's up with WASM. @birkenfeld ?

@jeanas
Copy link
Contributor Author

jeanas commented Nov 11, 2023

I'm looking into the Pyodide problem now.

@jeanas
Copy link
Contributor Author

jeanas commented Nov 11, 2023

(I've added a note to the CHANGES file about distribution file names.)

@jeanas
Copy link
Contributor Author

jeanas commented Nov 11, 2023

#2580 should hopefully fix the CI.

@Anteru
Copy link
Collaborator

Anteru commented Nov 11, 2023

Indeed it does :)

@Anteru Anteru added this to the 2.17 milestone Nov 17, 2023
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