Bug 1525984 - Review Request: python-ruamel-std-pathlib - An improvement over the standard pathlib module and pathlib2 package
Summary: Review Request: python-ruamel-std-pathlib - An improvement over the standard ...
Keywords:
Status: CLOSED NOTABUG
Alias: None
Product: Fedora
Classification: Fedora
Component: Package Review
Version: rawhide
Hardware: Unspecified
OS: Unspecified
unspecified
unspecified
Target Milestone: ---
Assignee: Nobody's working on this, feel free to take it
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard:
Depends On:
Blocks: FE-DEADREVIEW
TreeView+ depends on / blocked
 
Reported: 2017-12-14 14:26 UTC by Jared Smith
Modified: 2021-07-17 09:11 UTC (History)
4 users (show)

Fixed In Version:
Clone Of:
Environment:
Last Closed: 2021-07-17 09:11:07 UTC
Type: ---
Embargoed:


Attachments (Terms of Use)

Description Jared Smith 2017-12-14 14:26:38 UTC
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-1.fc28.src.rpm
Description: An improvement over the standard pathlib module and pathlib2 package
Fedora Account System Username: jsmith

Comment 1 Robert-André Mauchin 🐧 2017-12-14 17:36:28 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

Comment 2 Elliott Sales de Andrade 2017-12-14 20:12:08 UTC
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.

Comment 3 Jared Smith 2017-12-15 16:05:18 UTC
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

Comment 4 Robert-André Mauchin 🐧 2017-12-15 17:37:18 UTC
> 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

Comment 6 Robert-André Mauchin 🐧 2017-12-15 20:10:35 UTC
All ok, package approved.

Comment 7 Gwyn Ciesla 2017-12-15 22:35:55 UTC
(fedrepo-req-admin):  The Pagure repository was created at https://src.fedoraproject.org/rpms/python-ruamel-std-pathlib

Comment 8 Elliott Sales de Andrade 2019-01-08 05:01:21 UTC
Are you planning on building this or what?

Comment 9 Jared Smith 2020-01-02 15:41:08 UTC
No, I'm no longer needing this package.

Comment 10 Mattia Verga 2021-07-17 09:11:07 UTC
I've requested to orphan the git repo, closing as DEADREVIEW.
https://pagure.io/releng/issue/10216


Note You need to log in before you can comment on or make changes to this bug.