[Bug 1366878] Review Request: python-attrs - Python attributes without boilerplate

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



https://bugzilla.redhat.com/show_bug.cgi?id=1366878

Igor Gnatenko <ignatenko@xxxxxxxxxx> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|NEW                         |ASSIGNED
           Assignee|nobody@xxxxxxxxxxxxxxxxx    |ignatenko@xxxxxxxxxx



--- Comment #1 from Igor Gnatenko <ignatenko@xxxxxxxxxx> ---
* Add %global modname attrs in the beginning

> %if 0%{?rhel} && 0%{?rhel} <= 7
> %{!?__python2: %global __python2 /usr/bin/python2}
> %{!?python2_sitelib: %global python2_sitelib %(%{__python2} -c "from distutils.sysconfig import get_python_lib; print(get_python_lib())")}
> %{!?python2_sitearch: %global python2_sitearch %(%{__python2} -c "from distutils.sysconfig import get_python_lib; print(get_python_lib(1))")}
> %endif
> 
> %if 0%{?fedora} > 12 || 0%{?rhel} > 7
> %global with_python3 1
> %endif
Drop all this useless stuff

> Group:          Development/Libraries
drop it

> Source0:        https://github.com/hynek/attrs/archive/16.0.0.tar.gz
Source0:       
https://github.com/hynek/attrs/archive/%{version}/%{modname}-%{version}.tar.gz

> BuildRequires:  python2-devel python-setuptools python2-hypothesis
replace python-setuptools with python2-setuptools and put under subpackage

> %package -n python3-attrs
replace attrs with %{modname}

> %if 0%{?with_python3}
> rm -rf %{py3dir}
> cp -a . %{py3dir}
> %endif # with_python3
I guess it's not needed in your case as you don't modify python3 sources

> %{__python3} setup.py build
%py3_build

> %{__python2} setup.py build
%py2_build

> %{__python3} setup.py install --skip-build --root %{buildroot}
%py3_install

> %{__python2} setup.py install --skip-build --root %{buildroot}
%py2_install

* Also change for python2 being first

> %{python2_sitelib}/*
is too generic.

-- 
You are receiving this mail because:
You are on the CC list for the bug.
You are always notified about changes to this product and component
_______________________________________________
package-review mailing list
package-review@xxxxxxxxxxxxxxxxxxxxxxx
https://lists.fedoraproject.org/admin/lists/package-review@xxxxxxxxxxxxxxxxxxxxxxx




[Index of Archives]     [Fedora Legacy]     [Fedora Desktop]     [Fedora SELinux]     [Yosemite News]     [KDE Users]     [Fedora Tools]