Bug 1525984
| Summary: | Review Request: python-ruamel-std-pathlib - An improvement over the standard pathlib module and pathlib2 package | ||
|---|---|---|---|
| Product: | [Fedora] Fedora | Reporter: | Jared Smith <jsmith.fedora> |
| Component: | Package Review | Assignee: | Nobody's working on this, feel free to take it <nobody> |
| Status: | CLOSED NOTABUG | QA Contact: | Fedora Extras Quality Assurance <extras-qa> |
| Severity: | unspecified | Docs Contact: | |
| Priority: | unspecified | ||
| Version: | rawhide | CC: | eclipseo, jsmith.fedora, package-review, quantum.analyst |
| Target Milestone: | --- | ||
| Target Release: | --- | ||
| Hardware: | Unspecified | ||
| OS: | Unspecified | ||
| Whiteboard: | |||
| Fixed In Version: | Doc Type: | If docs needed, set a value | |
| Doc Text: | Story Points: | --- | |
| Clone Of: | Environment: | ||
| Last Closed: | 2021-07-17 09:11:07 UTC | Type: | --- |
| Regression: | --- | Mount Type: | --- |
| Documentation: | --- | CRM: | |
| Verified Versions: | Category: | --- | |
| oVirt Team: | --- | RHEL 7.3 requirements from Atomic Host: | |
| Cloudforms Team: | --- | Target Upstream Version: | |
| Embargoed: | |||
| Bug Depends On: | |||
| Bug Blocks: | 201449 | ||
|
Description
Jared Smith
2017-12-14 14:26:38 UTC
- It would be better to use the following syntax
%global with_python3 1 → %bcond_without python3
And:
%if 0%{?with_python3} → %if %{with python3}
- In the following comment, double the % to avoid macros replacement:
#Source0: https://files.pythonhosted.org/packages/source/r/%%{pypi_name}/%%{pypi_name}-%%{version}.tar.gz
- Add _example to %doc
- BuildRequires: pytest → BuildRequires: python2-pytest
- Run the tests provided:
%check
PYTHONPATH=$PYTHONPATH:%{buildroot}%{python2_sitelib} py.test-2
%if %{with python3}
PYTHONPATH=$PYTHONPATH:%{buildroot}%{python3_sitelib} py.test-3
%endif
- Be more specific in %files:
%files -n python2-%{pname}
%license LICENSE
%doc README.rst
%{python2_sitelib}/ruamel/
%{python2_sitelib}/ruamel.std.pathlib-%{version}-py?.?.egg-info/
%{python2_sitelib}/ruamel.std.pathlib-%{version}-py?.?-nspkg.pth
%if %{with python3}
%files -n python%{python3_pkgversion}-%{pname}
%license LICENSE
%doc README.rst
%{python3_sitelib}/ruamel/
%{python3_sitelib}/ruamel.std.pathlib-%{version}-py?.?.egg-info/
%{python3_sitelib}/ruamel.std.pathlib-%{version}-py?.?-nspkg.pth
%endif
Are you planning to support old EPEL or something? Why bother with the python3 flag at all (Fedora's going to be dropping Python 2, not 3; flagging the other way makes more sense in some way)? Relatedly, it would be best to figure out why tests are failing on Python 3 now. Use %py2_install/%py3_install macros. The only version of EPEL I'm really interested in at this point is EPEL 7, so I was following the proposed EPEL 7 python packaging guidelines at https://fedoraproject.org/wiki/PackagingDrafts:Python3EPEL, with more explanation at https://fedoraproject.org/wiki/User:Bkabrda/EPEL7_Python3 As for the %py2_install/%py3_install macros, I attempted to use those originally, but they failed with the following error: + /usr/bin/python2 setup.py install -O1 --skip-build --root /home/jsmith/Build/BUILDROOT/python-ruamel-std-pathlib-0.6.3-2.fc28.x86_64 error: you have to install with "pip install ." error: Bad exit status from /var/tmp/rpm-tmp.qH8GI7 (%install) I'd appreciate any help figuring out why that's failing. (I'm no expert at setup.py, but it appears that it throws that message if the "--single-version-externally-managed" isn't passed in.) Spec URL: https://jsmith.fedorapeople.org/Packaging/python-ruamel-std-pathlib/python-ruamel-std-pathlib.spec SRPM URL: https://jsmith.fedorapeople.org/Packaging/python-ruamel-std-pathlib/python-ruamel-std-pathlib-0.6.3-2.fc28.src.rpm > As for the %py2_install/%py3_install macros, I attempted to use those
> originally, but they failed with the following error:
>
> + /usr/bin/python2 setup.py install -O1 --skip-build --root
> /home/jsmith/Build/BUILDROOT/python-ruamel-std-pathlib-0.6.3-2.fc28.x86_64
> error: you have to install with "pip install ."
> error: Bad exit status from /var/tmp/rpm-tmp.qH8GI7 (%install)
>
> I'd appreciate any help figuring out why that's failing. (I'm no expert at
> setup.py, but it appears that it throws that message if the
> "--single-version-externally-managed" isn't passed in.)
>
I tried %py2_install/%py3_install in my initial review too to see why you didn't use them and had the same error, but now reading the source code, it appears you can use an environment variable to bypass the check:
%install
RUAMEL_NO_PIP_INSTALL_CHECK=1 %py2_install
%if %{with python3}
RUAMEL_NO_PIP_INSTALL_CHECK=1 %py3_install
%endif
- Be more specific in %files:
%files -n python2-%{pname}
%license LICENSE
%doc README.rst
%{python2_sitelib}/ruamel/
%{python2_sitelib}/ruamel.std.pathlib-%{version}-py?.?.egg-info/
%{python2_sitelib}/ruamel.std.pathlib-%{version}-py?.?-nspkg.pth
%if %{with python3}
%files -n python%{python3_pkgversion}-%{pname}
%license LICENSE
%doc README.rst
%{python3_sitelib}/ruamel/
%{python3_sitelib}/ruamel.std.pathlib-%{version}-py?.?.egg-info/
%{python3_sitelib}/ruamel.std.pathlib-%{version}-py?.?-nspkg.pth
%endif
Spec URL: https://jsmith.fedorapeople.org/Packaging/python-ruamel-std-pathlib/python-ruamel-std-pathlib.spec SRPM URL: https://jsmith.fedorapeople.org/Packaging/python-ruamel-std-pathlib/python-ruamel-std-pathlib-0.6.3-3.fc28.src.rpm All ok, package approved. (fedrepo-req-admin): The Pagure repository was created at https://src.fedoraproject.org/rpms/python-ruamel-std-pathlib Are you planning on building this or what? No, I'm no longer needing this package. I've requested to orphan the git repo, closing as DEADREVIEW. https://pagure.io/releng/issue/10216 |