On Sat, 27 Mar 2021 00:05:35 +0000
Julian Smith
On Fri, 26 Mar 2021 23:19:30 +0000 "Thomas Kluyver"
wrote: On Fri, 26 Mar 2021, at 23:04, Julian Smith wrote:
I can't tell from pip-18.1's diagnostics what exactly is going wrong.
Given that my setup.py implements the normal distutils-style argv handling, i was expecting things to work, but pip-18.1 appears to fail before it even tries to run setup.py, so the only thing i can think of is that the PKG-INFO file could be causing a problem?
Looking at your package, I think the issue is that you have the files (setup.py etc.) in the top level of the tarball, but pip is expecting a <name>-<version> folder in the tarball which contains all the files.
The actual format of sdists is something that's not yet properly documented, as far as I know, but you can look at essentially any package to see what I mean in this case. E.g. six:
https://files.pythonhosted.org/packages/6b/34/415834bfdafca3c5f451532e8a8d9b...
Thanks for this. I had high hopes that this would solve things, but unfortunately i'm seeing the same behaviour as before.
I've uploaded my new sdist, optest-1.0.20210326.2328.tar.gz, so one can attempt to install it with:
pip install -i https://test.pypi.org/simple optest
The six-1.15.0.tar.gz file you mention does install with pip-18.1, in an interesting way - it fails at first before eventually succeeding by running 'setup.py install':
Processing ./six-1.15.0.tar.gz Building wheels for collected packages: six Running setup.py bdist_wheel for six ... error Complete output from command /home/jules/artifex-remote/pylocal/bin/python3 -u -c "import setuptools, tokenize;__file__='/tmp/pip-req-build-naagtvzk/setup.py';f=getattr(tokenize, 'open', open)(__file__);code=f.read().replace('\r\n', '\n');f.close();exec(compile(code, __file__, 'exec'))" bdist_wheel -d /tmp/pip-wheel-ouokji77 --python-tag cp37: usage: -c [global_opts] cmd1 [cmd1_opts] [cmd2 [cmd2_opts] ...] or: -c --help [cmd1 cmd2 ...] or: -c --help-commands or: -c cmd --help
error: invalid command 'bdist_wheel'
---------------------------------------- Failed building wheel for six Running setup.py clean for six Failed to build six Installing collected packages: six Running setup.py install for six ... done Successfully installed six-1.15.0
This is how i thought my sdist would install, so i guess i could try to move my sdist to be similar to six-1.15.0.tar.gz, and things should eventually start to work.
I eventually managed to local installs from sdist to work with pip-18.1
by modifying my pyproject.toml, changing:
[build-system]
requires = []
to:
[build-system]
requires = ["wheel"]
[Using "setup" also works.]
This seems to make a difference even though my setup.py and pipcl.py
files don't use setuptools.
I also had to make my setup.py script handle the 'dist_info' command.
setuptools.setup()'s help text doesn't mention this so it's not
immediately clear what it is supposed to do, but it turns out to be
similar to egg_info except for putting files in