]> git.pld-linux.org Git - packages/python-commonmark.git/commitdiff
- updated to 0.8.1 auto/th/python-commonmark-0.8.1-1
authorJakub Bogusz <qboosh@pld-linux.org>
Sat, 6 Oct 2018 06:48:25 +0000 (08:48 +0200)
committerJakub Bogusz <qboosh@pld-linux.org>
Sat, 6 Oct 2018 06:48:25 +0000 (08:48 +0200)
- added deps patch (don't require future on python3, loose hypothesis version)

python-commonmark-deps.patch [new file with mode: 0644]
python-commonmark.spec

diff --git a/python-commonmark-deps.patch b/python-commonmark-deps.patch
new file mode 100644 (file)
index 0000000..a7a692d
--- /dev/null
@@ -0,0 +1,23 @@
+--- commonmark-0.8.1/setup.py.orig     2018-09-06 19:15:16.000000000 +0200
++++ commonmark-0.8.1/setup.py  2018-10-06 08:34:46.490706284 +0200
+@@ -21,10 +21,8 @@
+ tests_require = [
+-    'flake8==3.5.0',
+-    'hypothesis==3.55.3',
++    'hypothesis>=3.55.3',
+     # For python 2.6
+-    'hypothesislegacysupport',
+ ]
+@@ -55,7 +53,7 @@
+     },
+     cmdclass={'test': Test},
+     install_requires=[
+-        'future',
++        # 'future', # python2 only
+     ],
+     tests_require=tests_require,
+     extras_require={'test': tests_require},
index 9b3f78b0191951781c0a51c46327b5f1be71bab7..c80581adaecec7d8e8eebd82066f31b0082652bf 100644 (file)
@@ -1,58 +1,91 @@
-# TODO:
-# - package %{_bindir}/cmark
 #
 # Conditional build:
 %bcond_without python2 # CPython 2.x module
 %bcond_without python3 # CPython 3.x module
+%bcond_without tests   # unit tests
 
 Summary:       Python parser for the CommonMark Markdown spec
+Summary(pl.UTF-8):     Pythonowy parser specyfikacji CommonMark Markdown
 Name:          python-commonmark
-Version:       0.7.5
+Version:       0.8.1
 Release:       1
 License:       BSD
 Group:         Libraries/Python
-Source0:       https://pypi.python.org/packages/source/c/commonmark/CommonMark-%{version}.tar.gz
-# Source0-md5: 70cb4ade4b9d0370213be9816f99a21e
+Source0:       https://files.pythonhosted.org/packages/source/c/commonmark/commonmark-%{version}.tar.gz
+# Source0-md5: f0925dd4fe99e8e177dfac930ac1972d
+Patch0:                %{name}-deps.patch
 URL:           https://github.com/rtfd/CommonMark-py
 %if %{with python2}
 BuildRequires: python-modules >= 1:2.7
 BuildRequires: python-setuptools
+%if %{with tests}
+BuildRequires: python-future
+BuildRequires: python-hypothesis >= 3.55.3
+%endif
 %endif
 %if %{with python3}
 BuildRequires: python3-modules >= 1:3.3
 BuildRequires: python3-setuptools
+%if %{with tests}
+BuildRequires: python3-hypothesis >= 3.55.3
+%endif
 %endif
 BuildRequires: rpm-pythonprov
 BuildRequires: rpmbuild(macros) >= 1.714
+Requires:      python-future
 Requires:      python-modules >= 1:2.7
 BuildArch:     noarch
 BuildRoot:     %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
 
 %description
-CommonMark-py is a pure Python port of jgms commonmark.js, a Markdown
+CommonMark-py is a pure Python port of jgm's commonmark.js, a Markdown
 parser and renderer for the CommonMark specification, using only
 native modules.
 
+%description -l pl.UTF-8
+CommonMark-py to czysto perlowy port kodu jgm commonmark.js - parsera
+i renderera specyfikacji CommonMark, napisany przy wyłącznie przy
+użyciu natywnych modułów.
+
 %package -n python3-commonmark
 Summary:       Python parser for the CommonMark Markdown spec
+Summary(pl.UTF-8):     Pythonowy parser specyfikacji CommonMark Markdown
 Group:         Libraries/Python
 Requires:      python3-modules >= 1:3.3
 
 %description -n python3-commonmark
-CommonMark-py is a pure Python port of jgms commonmark.js, a Markdown
+CommonMark-py is a pure Python port of jgm's commonmark.js, a Markdown
 parser and renderer for the CommonMark specification, using only
 native modules.
 
+%description -n python3-commonmark -l pl.UTF-8
+CommonMark-py to czysto perlowy port kodu jgm commonmark.js - parsera
+i renderera specyfikacji CommonMark, napisany przy wyłącznie przy
+użyciu natywnych modułów.
+
 %prep
-%setup -q -n CommonMark-%{version}
+%setup -q -n commonmark-%{version}
+%patch0 -p1
 
 %build
 %if %{with python2}
 %py_build
+
+%if %{with tests}
+LC_ALL=C.UTF-8 \
+PYTHONPATH=$(pwd)/build-2/lib \
+%{__python} commonmark/tests/run_spec_tests.py
+%endif
 %endif
 
 %if %{with python3}
 %py3_build
+
+%if %{with tests}
+LC_ALL=C.UTF-8 \
+PYTHONPATH=$(pwd)/build-3/lib \
+%{__python} commonmark/tests/run_spec_tests.py
+%endif
 %endif
 
 %install
@@ -62,10 +95,16 @@ rm -rf $RPM_BUILD_ROOT
 %py_install
 
 %py_postclean
+
+%{__mv} $RPM_BUILD_ROOT%{_bindir}/cmark{,-2}
 %endif
 
 %if %{with python3}
 %py3_install
+
+%{__mv} $RPM_BUILD_ROOT%{_bindir}/cmark{,-3}
+
+ln -sf cmark-3 $RPM_BUILD_ROOT%{_bindir}/cmark
 %endif
 
 %clean
@@ -74,15 +113,18 @@ rm -rf $RPM_BUILD_ROOT
 %if %{with python2}
 %files
 %defattr(644,root,root,755)
-%doc README.rst
-%{py_sitescriptdir}/CommonMark
-%{py_sitescriptdir}/CommonMark-%{version}-py*.egg-info
+%doc LICENSE README.rst
+%attr(755,root,root) %{_bindir}/cmark-2
+%{py_sitescriptdir}/commonmark
+%{py_sitescriptdir}/commonmark-%{version}-py*.egg-info
 %endif
 
 %if %{with python3}
 %files -n python3-commonmark
 %defattr(644,root,root,755)
-%doc README.rst
-%{py3_sitescriptdir}/CommonMark
-%{py3_sitescriptdir}/CommonMark-%{version}-py*.egg-info
+%doc LICENSE README.rst
+%attr(755,root,root) %{_bindir}/cmark
+%attr(755,root,root) %{_bindir}/cmark-3
+%{py3_sitescriptdir}/commonmark
+%{py3_sitescriptdir}/commonmark-%{version}-py*.egg-info
 %endif
This page took 0.138647 seconds and 4 git commands to generate.