webrecorder / warcio

Streaming WARC/ARC library for fast web archive IO
https://pypi.python.org/pypi/warcio
Apache License 2.0
375 stars 58 forks source link

py3.12 and setuptools #181

Open wumpus opened 1 month ago

wumpus commented 1 month ago

In all of that flurry of CI work: while the CI explicitly installs setuptools for >=py3.12, ... after we release a new pypi version, are py3.12-using end-users going to have to explicitly install setuptools before doing pip install pypi?

Cc @white-gecko

Florents-Tselai commented 1 month ago

while the CI explicitly installs setuptools for >=py3.12

I noticed that but couldn't understand why it has to. e.g. here's a pretty standard yml file and haven't had to touch setuptools explicitly.

py3.12-using end-users going to have to explicitly install setuptools before doing

Probably not, the virtualenv creator should have taken care of that already.

Also just tried python3.12 -m pip install warcio and worked fine.

white-gecko commented 6 days ago

I think https://docs.python.org/dev/whatsnew/3.12.html#ensurepip is, what you are looking for.

Since python 3.12, venv, virtualenvwrapper does not install setuptools on its own. If I don't overlook anything, since 29da91683a7b88b20d4cd12f9d8a8819dd3531cb setuptools is no longer required to run warcio. pip install warcio works without setuptools, but to install warcio via its setup.py, setuptools obviously is required and needs to be installed if it is not present.

nvanderperren commented 5 days ago

I had to install setuptools (pip install setuptools) in my virtualenv with python 3.12 in order to run warcio check.

I had a ModuleNotFoundError: No module named 'pkg_resources' after installing it with pip install warcio without having setuptools.

white-gecko commented 5 days ago

@nvanderperren are you on the current master or which version are you running?

nvanderperren commented 5 days ago

I just did pip install warcio as mentioned in the README. That is warcio 1.7.4

white-gecko commented 5 days ago

Yes, this one would still require setuptools.