-
Notifications
You must be signed in to change notification settings - Fork 104
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
Bump version for packaging changes #96
Conversation
* Add all dependencies to pyproject.toml Signed-off-by: Jhon Honce <jhonce@redhat.com>
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
bors r+ |
96: Bump version for packaging changes r=mwhahaha a=jwhonce * Add all dependencies to pyproject.toml Changes re: https://bugzilla.redhat.com/show_bug.cgi?id=1956841#c13 Signed-off-by: Jhon Honce <jhonce@redhat.com> Co-authored-by: Jhon Honce <jhonce@redhat.com>
Build failed:
|
"requests>=2.24", | ||
"toml>=0.10.2", | ||
"urllib3>=1.24.2", | ||
"pyxdg>=0.26", |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Are you sure the build system requires all those? Those are already required by the actual package.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@hroncok The fedora build system requested these be added here as well.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Could you please explain what does "the fedora build system requested" mean?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
(To clarify, I maintain the Python-related bits of the Fedora build system, so that is where my interest comes from.)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I see the log referenced from the bugzilla comment mentioned in this PR:
+ /usr/bin/python3 -s /usr/lib/rpm/redhat/pyproject_buildrequires.py --generate-extras --python3_pkgversion 3
Handling setuptools>=42 from build-system.requires
Requirement satisfied: setuptools>=42
(installed: setuptools 56.1.0)
Handling wheel from build-system.requires
Requirement satisfied: wheel
(installed: wheel 0.36.2)
Traceback (most recent call last):
File "/usr/lib/python3.9/site-packages/setuptools/config.py", line 33, in __getattr__
return next(
StopIteration
The above exception was the direct cause of the following exception:
Traceback (most recent call last):
File "/usr/lib/python3.9/site-packages/setuptools/config.py", line 387, in _parse_attr
return getattr(StaticModule(module_name), attr_name)
File "/usr/lib/python3.9/site-packages/setuptools/config.py", line 41, in __getattr__
raise AttributeError(
AttributeError: podman has no attribute __version__
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "/usr/lib/rpm/redhat/pyproject_buildrequires.py", line 380, in main
generate_requires(
File "/usr/lib/rpm/redhat/pyproject_buildrequires.py", line 322, in generate_requires
generate_build_requirements(backend, requirements)
File "/usr/lib/rpm/redhat/pyproject_buildrequires.py", line 210, in generate_build_requirements
new_reqs = get_requires()
File "/usr/lib/python3.9/site-packages/setuptools/build_meta.py", line 154, in get_requires_for_build_wheel
return self._get_build_requires(
File "/usr/lib/python3.9/site-packages/setuptools/build_meta.py", line 135, in _get_build_requires
self.run_setup()
File "/usr/lib/python3.9/site-packages/setuptools/build_meta.py", line 150, in run_setup
exec(compile(code, __file__, 'exec'), locals())
File "setup.py", line 30, in <module>
setuptools.setup(
File "/usr/lib/python3.9/site-packages/setuptools/__init__.py", line 153, in setup
return distutils.core.setup(**attrs)
File "/usr/lib64/python3.9/distutils/core.py", line 121, in setup
dist.parse_config_files()
File "/usr/lib/python3.9/site-packages/setuptools/dist.py", line 742, in parse_config_files
parse_configuration(self, self.command_options,
File "/usr/lib/python3.9/site-packages/setuptools/config.py", line 157, in parse_configuration
meta.parse()
File "/usr/lib/python3.9/site-packages/setuptools/config.py", line 463, in parse
section_parser_method(section_options)
File "/usr/lib/python3.9/site-packages/setuptools/config.py", line 436, in parse_section
self[name] = value
File "/usr/lib/python3.9/site-packages/setuptools/config.py", line 220, in __setitem__
value = parser(value)
File "/usr/lib/python3.9/site-packages/setuptools/config.py", line 552, in _parse_version
version = self._parse_attr(value, self.package_dir)
File "/usr/lib/python3.9/site-packages/setuptools/config.py", line 390, in _parse_attr
module = importlib.import_module(module_name)
File "/usr/lib64/python3.9/importlib/__init__.py", line 127, in import_module
return _bootstrap._gcd_import(name[level:], package, level)
File "<frozen importlib._bootstrap>", line 1030, in _gcd_import
File "<frozen importlib._bootstrap>", line 1007, in _find_and_load
File "<frozen importlib._bootstrap>", line 986, in _find_and_load_unlocked
File "<frozen importlib._bootstrap>", line 680, in _load_unlocked
File "<frozen importlib._bootstrap_external>", line 855, in exec_module
File "<frozen importlib._bootstrap>", line 228, in _call_with_frames_removed
File "/builddir/build/BUILD/podman-py-3.1.2.3/podman/__init__.py", line 11, in <module>
from podman.api.version import __version__
File "/builddir/build/BUILD/podman-py-3.1.2.3/podman/api/__init__.py", line 5, in <module>
from podman.api.client import APIClient
File "/builddir/build/BUILD/podman-py-3.1.2.3/podman/api/client.py", line 6, in <module>
import requests
ModuleNotFoundError: No module named 'requests'
Is not that the Fedora build system requested these, is that the package here tries to import itself upon building. Would you be interested in me checking how to avoid that entirely instead of requiring all the runtime dependencies just to create a wheel?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Moving the __version__
attribute to a the top level module makes it work:
diff --git a/podman/__init__.py b/podman/__init__.py
index c631c35..87accba 100644
--- a/podman/__init__.py
+++ b/podman/__init__.py
@@ -8,7 +8,7 @@ except ImportError:
raise NotImplementedError("ApiConnection deprecated, please use PodmanClient().")
-from podman.api.version import __version__
+__version__ = "3.1.2.4"
from podman.client import PodmanClient, from_env
# isort: unique-list
diff --git a/pyproject.toml b/pyproject.toml
index 0c7306c..134204b 100644
--- a/pyproject.toml
+++ b/pyproject.toml
@@ -17,11 +17,7 @@ profile = "black"
line_length = 100
[build-system]
requires = [
- "requests>=2.24",
- "toml>=0.10.2",
- "urllib3>=1.24.2",
- "pyxdg>=0.26",
- "setuptools>=42",
+ "setuptools>=46.4",
"wheel",
]
build-backend = "setuptools.build_meta"
That would however also require changes in podman.api.version
to load the attribute from podman
.
It also requires setuptools 46.4, which introduced this feature.
Changes re: https://bugzilla.redhat.com/show_bug.cgi?id=1956841#c13
Signed-off-by: Jhon Honce jhonce@redhat.com