From 80294674c8ff97a81ad99962cbd7334346659d6f Mon Sep 17 00:00:00 2001 From: Thomas Moschny Date: Feb 09 2019 08:41:17 +0000 Subject: Update to 2.3.7. Simplify spec file. --- diff --git a/.gitignore b/.gitignore index 606e487..4b573ad 100644 --- a/.gitignore +++ b/.gitignore @@ -1 +1,2 @@ /markdown2-*.zip +/markdown2-2.3.7.tar.gz diff --git a/markdown2-2.3.7-setup_cfg.patch b/markdown2-2.3.7-setup_cfg.patch new file mode 100644 index 0000000..33f5e77 --- /dev/null +++ b/markdown2-2.3.7-setup_cfg.patch @@ -0,0 +1,9 @@ +diff -up markdown2-2.3.7/setup.cfg.orig markdown2-2.3.7/setup.cfg +--- markdown2-2.3.7/setup.cfg.orig 2019-02-09 09:27:17.455200378 +0100 ++++ markdown2-2.3.7/setup.cfg 2019-02-09 09:28:22.163409129 +0100 +@@ -1,5 +1,4 @@ + [aliases] +-build = sdist bdist_wheel + + [wheel] + universal = 1 diff --git a/python-markdown2.spec b/python-markdown2.spec index dbd6664..c9b9915 100644 --- a/python-markdown2.spec +++ b/python-markdown2.spec @@ -1,19 +1,17 @@ %global srcname markdown2 Name: python-%{srcname} -Version: 2.3.6 -Release: 2%{?dist} +Version: 2.3.7 +Release: 1%{?dist} Summary: A fast and complete Python implementation of Markdown License: MIT URL: https://github.com/trentm/python-%{srcname}/ -Source0: https://pypi.io/packages/source/m/%{srcname}/%{srcname}-%{version}.zip +Source0: https://pypi.io/packages/source/m/%{srcname}/%{srcname}-%{version}.tar.gz +# remove alias for 'build' +Patch0: markdown2-2.3.7-setup_cfg.patch BuildArch: noarch BuildRequires: python2-devel -%if 0%{?fedora} >= 25 BuildRequires: python2-pygments -%else -BuildRequires: python-pygments -%endif BuildRequires: python3-devel BuildRequires: python3-pygments @@ -66,67 +64,49 @@ http://daringfireball.net/projects/markdown/ %prep -%setup0 -qc -n %{srcname}-%{version} -mv %{srcname}-%{version} python2 -cp -a python2 python3 +%autosetup -n %{srcname}-%{version} -p1 %build -pushd python2 %py2_build -popd - -pushd python3 %py3_build -popd %install -pushd python2 %py2_install -# remove shebangs and fix permissions -find %{buildroot}%{python2_sitelib} \( -name '*.py' -o -name 'py.*' \) \ - -exec sed -i '1{/^#!/d}' {} \; \ - -exec chmod u=rw,go=r {} \; - # rename binary mv %{buildroot}%{_bindir}/%{srcname}{,-%{python2_version}} ln -s %{srcname}-%{python2_version} %{buildroot}%{_bindir}/%{srcname}-2 -popd -pushd python3 %py3_install -# remove shebangs and fix permissions -find %{buildroot}%{python3_sitelib} \( -name '*.py' -o -name 'py.*' \) \ - -exec sed -i '1{/^#!/d}' {} \; \ - -exec chmod u=rw,go=r {} \; - # rename binary mv %{buildroot}%{_bindir}/%{srcname}{,-%{python3_version}} ln -s %{srcname}-%{python3_version} %{buildroot}%{_bindir}/%{srcname}-3 -popd + +# remove shebangs and fix permissions +find %{buildroot}%{python2_sitelib} %{buildroot}%{python3_sitelib} \ + \( -name '*.py' -o -name 'py.*' \) \ + -exec sed -i '1{/^#!/d}' {} \; \ + -exec chmod u=rw,go=r {} \; # 2.X binary is called by default for now ln -s %{srcname}-%{python2_version} %{buildroot}%{_bindir}/%{srcname} %check -pushd python2/test +pushd test %{__python2} test.py -- -knownfailure %{?skip_tests} || : -popd - -pushd python3/test %{__python3} test.py -- -knownfailure %{?skip_tests} || : popd %files -n python2-%{srcname} -%doc python2/CHANGES.md -%doc python2/CONTRIBUTORS.txt -%doc python2/TODO.txt -%license python2/LICENSE.txt +%doc CHANGES.md +%doc CONTRIBUTORS.txt +%doc TODO.txt +%license LICENSE.txt %{python2_sitelib}/* %{_bindir}/%{srcname} %{_bindir}/%{srcname}-2 @@ -134,10 +114,10 @@ popd %files -n python3-%{srcname} -%doc python3/CHANGES.md -%doc python3/CONTRIBUTORS.txt -%doc python3/TODO.txt -%license python3/LICENSE.txt +%doc CHANGES.md +%doc CONTRIBUTORS.txt +%doc TODO.txt +%license LICENSE.txt %{python3_sitelib}/* %exclude %dir %{python3_sitelib}/__pycache__ %{_bindir}/%{srcname}-3 @@ -145,6 +125,10 @@ popd %changelog +* Sat Feb 9 2019 Thomas Moschny - 2.3.7-1 +- Update to 2.3.7. +- Simplify spec file. + * Sat Feb 02 2019 Fedora Release Engineering - 2.3.6-2 - Rebuilt for https://fedoraproject.org/wiki/Fedora_30_Mass_Rebuild diff --git a/sources b/sources index c3da271..1d5b286 100644 --- a/sources +++ b/sources @@ -1 +1 @@ -SHA512 (markdown2-2.3.6.zip) = 4b8647424dd94406199adf5cb619143b466a3e5026be15ac682df9c0da21d2995195a873313988e8c572407e6053632e0c4910da70eadb2de2b10832102f3340 +SHA512 (markdown2-2.3.7.tar.gz) = 4426c4fc06cc4c8a44e5e7362fc44f16cba56b685916e02125e4b255ed7808be17ec5708031996128f208fb92c4f4874c2dc1cde6494d30232ffdbe9477c271f