diff --git a/.gitignore b/.gitignore index 8ee9054..30ec89f 100644 --- a/.gitignore +++ b/.gitignore @@ -3,3 +3,4 @@ /autopep8-1.1.1.tar.gz /autopep8-1.2.tar.gz /autopep8-1.2.1.tar.gz +/autopep8-1.2.4.tar.gz diff --git a/python-autopep8.spec b/python-autopep8.spec index 33cb2b7..5880716 100644 --- a/python-autopep8.spec +++ b/python-autopep8.spec @@ -6,26 +6,37 @@ %global py3_name python3-%{pypi_name} Name: python-autopep8 -Version: 1.2.1 -Release: 3%{?dist} +Version: 1.2.4 +Release: 1%{?dist} Summary: The package autopep8 formats Python code based on the output of the pep8 utility License: MIT URL: http://pypi.python.org/pypi/autopep8 -Source0: https://pypi.python.org/packages/source/a/%{pypi_name}/%{pypi_name}-%{version}.tar.gz +Source0: https://files.pythonhosted.org/packages/source/a/%{pypi_name}/%{pypi_name}-%{version}.tar.gz BuildArch: noarch + +%description +autopep8 formats Python code based on the output of the pep8 utility. + +%package -n python2-%{pypi_name} +Summary: The package autopep8 formats Python code based on the output of the pep8 utility + BuildRequires: python2-devel BuildRequires: python-pep8 Requires: python-pep8 +%{?python_provide:%python_provide python2-%{pypi_name}} -%description +%description -n python2-%{pypi_name} autopep8 formats Python code based on the output of the pep8 utility. + + %if 0%{?with_python3} %package -n %{py3_name} Summary: The package autopep8 formats Python code based on the output of the pep8 utility +%{?python_provide:%python_provide python3-%{pypi_name}} BuildRequires: python3-devel BuildRequires: python3-pep8 Requires: python3-pep8 @@ -36,23 +47,16 @@ autopep8 formats Python code based on the output of the pep8 utility. %prep -%setup -q -n autopep8-%{version} +%autosetup -n autopep8-%{version} sed -i -e '1d' autopep8.py touch test/__init__.py #test needs to be a python module otherwise test will fial -%if 0%{?with_python3} -rm -rf %{py3dir} -cp -a . %{py3dir} -%endif - %build -%{__python2} setup.py build +%py2_build %if 0%{?with_python3} -pushd %{py3dir} -%{__python3} setup.py build -popd +%py3_build %endif @@ -63,38 +67,52 @@ LANG=en_US.utf8 %{__python2} setup.py test %endif %if 0%{?with_python3} -pushd %{py3dir} LANG=en_US.utf8 %{__python3} setup.py test -popd %endif %install %if 0%{?with_python3} -pushd %{py3dir} %{__python3} setup.py install -O1 --skip-build --root $RPM_BUILD_ROOT mv %{buildroot}%{_bindir}/%{pypi_name} %{buildroot}%{_bindir}/%{py3_name} +pushd %{buildroot}%{_bindir} +ln -s %{py3_name} %{pypi_name}-3 +ln -s %{py3_name} %{pypi_name}-%{python3_version} popd %endif %{__python2} setup.py install -O1 --skip-build --root $RPM_BUILD_ROOT +pushd %{buildroot}%{_bindir} +ln -s %{pypi_name} %{pypi_name}-2 +ln -s %{pypi_name} %{pypi_name}-%{python2_version} +popd -%files +%files -n python2-%{pypi_name} %doc README.rst +%license LICENSE %{python2_sitelib}/* %{_bindir}/%{pypi_name} +%{_bindir}/%{pypi_name}-2 +%{_bindir}/%{pypi_name}-%{python2_version} %if 0%{?with_python3} %files -n %{py3_name} +%license LICENSE %doc README.rst %{python3_sitelib}/* %{_bindir}/%{py3_name} +%{_bindir}/%{pypi_name}-3 +%{_bindir}/%{pypi_name}-%{python3_version} %endif %changelog +* Tue Nov 01 2016 Matthias Runge - 1.2.4-1 +- update to 1.2.4 +- update python3 executable name in new style (rhbz#1341315) + * Tue Jul 19 2016 Fedora Release Engineering - 1.2.1-3 - https://fedoraproject.org/wiki/Changes/Automatic_Provides_for_Python_RPM_Packages diff --git a/sources b/sources index 4c75332..3dd13a0 100644 --- a/sources +++ b/sources @@ -1 +1 @@ -4167555f521ddd69b66f13819604f3db autopep8-1.2.1.tar.gz +fcea19c0c5e505b425e2a78afb771f5c autopep8-1.2.4.tar.gz