Closed johanneskastl closed 1 year ago
Can you please reproduce it also with the version you find in master?
Can you please reproduce it also with the version you find in master?
Can I just run it from the cloned repository? Or do I need to uninstall the rpm package?
You can run just from the cloned repository. Make sure to pick the right binary. Thank you so much
Starting from within the py2pack folder in the clone, I get this:
.../py2pack/py2pack (master *)>python3.10 ./__init__.py fetch pynitrokey
downloading package pynitrokey-0.4.36...
from https://files.pythonhosted.org/packages/source/p/pynitrokey/pynitrokey-0.4.36.tar.gz
...//py2pack/py2pack (master *)>python3.10 ./__init__.py generate -t opensuse.spec -f python-pynitrokey.spec pynitrokey
generating spec file for pynitrokey...
Traceback (most recent call last):
File "/tmp/metaextract_b3a8lzih/pynitrokey-0.4.36/setup.py", line 3, in <module>
setup()
File "/usr/lib/python3.10/site-packages/setuptools/__init__.py", line 108, in setup
return distutils.core.setup(**attrs)
File "/usr/lib/python3.10/site-packages/setuptools/_distutils/core.py", line 159, in setup
dist.parse_config_files()
File "/usr/lib/python3.10/site-packages/setuptools/dist.py", line 885, in parse_config_files
pyprojecttoml.apply_configuration(self, filename, ignore_option_errors)
File "/usr/lib/python3.10/site-packages/setuptools/config/pyprojecttoml.py", line 62, in apply_configuration
config = read_configuration(filepath, True, ignore_option_errors, dist)
File "/usr/lib/python3.10/site-packages/setuptools/config/pyprojecttoml.py", line 140, in read_configuration
return expand_configuration(asdict, root_dir, ignore_option_errors, dist)
File "/usr/lib/python3.10/site-packages/setuptools/config/pyprojecttoml.py", line 195, in expand_configuration
return _ConfigExpander(config, root_dir, ignore_option_errors, dist).expand()
File "/usr/lib/python3.10/site-packages/setuptools/config/pyprojecttoml.py", line 243, in expand
self._expand_all_dynamic(dist, package_dir)
File "/usr/lib/python3.10/site-packages/setuptools/config/pyprojecttoml.py", line 281, in _expand_all_dynamic
obtained_dynamic = {
File "/usr/lib/python3.10/site-packages/setuptools/config/pyprojecttoml.py", line 282, in <dictcomp>
field: self._obtain(dist, field, package_dir)
File "/usr/lib/python3.10/site-packages/setuptools/config/pyprojecttoml.py", line 331, in _obtain
self._ensure_previously_set(dist, field)
File "/usr/lib/python3.10/site-packages/setuptools/config/pyprojecttoml.py", line 307, in _ensure_previously_set
raise OptionError(msg)
distutils.errors.DistutilsOptionError: No configuration found for dynamic 'description'.
Some dynamic fields need to be specified via `tool.setuptools.dynamic`
others must be specified via the equivalent attribute in `setup.py`.
/home/GIT_Repositories/OBS_und_Co/py2pack/py2pack/./__init__.py:262: UserWarning: Could not get information from tarball pynitrokey-0.4.36.tar.gz: Command '/usr/bin/python3.10 setup.py -q --command-packages metaextract metaextract -o /tmp/tmpsrut3zie ' returned non-zero exit status 1.. Valuable information for the generation might be missing.
warnings.warn("Could not get information from tarball {}: {}. Valuable "
The distutils.errors.DistutilsOptionError: No configuration found for dynamic 'description'.
is the same as in the initial error. The warning in the end looks like it is coming from running from the cloned directory.
Hi Johannes,
With
[build-system]
requires = ["flit_core >=3.2,<4"]
build-backend = "flit_core.buildapi"
in pynitrokey's pyproject.toml, the code should never get to the UserWarning about failing setuptools in the current master branch:
Your backtrace shows a different wording and line number, you seem to still have the old code:
Please do a git pull and check again.
Thanks for the explanation, @bnavigator !
I tried to use current master, even uninstall py2pack to make sure nothing interferes. But now I get this error (which seems to be unrelated to the original error):
$ python3.10 ./__init__.py fetch pynitrokey
Traceback (most recent call last):
File "/home/GIT_Repositories/OBS_und_Co/py2pack/py2pack/./__init__.py", line 39, in <module>
import py2pack.proxy
ModuleNotFoundError: No module named 'py2pack.proxy'
$ python3.10 ./__init__.py generate -t opensuse.spec -f python-pynitrokey.spec pynitrokey
Traceback (most recent call last):
File "/home/GIT_Repositories/OBS_und_Co/py2pack/py2pack/./__init__.py", line 39, in <module>
import py2pack.proxy
ModuleNotFoundError: No module named 'py2pack.proxy'
You're one directory level too deep. Call add it to your __init__.py
from the repository toplevel orPYTHONPATH
so that py2pack
is found in sys.path
.
PYTHONPATH=$PWD python3.10 ./py2pack/__init__.py fetch pynitrokey
Thanks @bnavigator , that worked. The command does no longer crash and creates a spec file. Setting this to solved, current state from git does not have this problem.
A new release is urgent here. Thanks Johannes
pynitrokey https://github.com/Nitrokey/pynitrokey https://pypi.org/project/pynitrokey/