Browse Source

python-pygments-2.1.3-1

git-svn-id: http://trac.vinelinux.org/repos/projects/specs@10602 ec354946-7b23-47d6-9f5a-488ba84defc7
tomop 7 years ago
parent
commit
9f0b33681e
1 changed files with 39 additions and 9 deletions
  1. 39 9
      p/python-pygments/python-pygments-vl.spec

+ 39 - 9
p/python-pygments/python-pygments-vl.spec

@@ -1,11 +1,37 @@
-%global with_python3 0
+%{!?__python3:%global __python3 /usr/bin/python3}
+%{!?python3_inc:%global python3_inc %(%{__python3} -c "from distutils.sysconfig import get_python_inc; print(get_python_inc(1))")}
+%{!?python3_sitearch: %global python3_sitearch %(python3 -c "from distutils.sysconfig import get_python_lib; import sys; sys.stdout.write(get_python_lib(1))")}
+%{!?python3_sitelib: %global python3_sitelib %(python3 -c "from distutils.sysconfig import get_python_lib; print(get_python_lib())")}
+%{!?python3_version: %global python3_version %(python3 -c "import sys; sys.stdout.write(sys.version[:3])")}
+%{!?__python2: %global __python2 /usr/bin/python2}
+%{!?python2_sitearch: %global python2_sitearch %(%{__python2} -c "from distutils.sysconfig import get_python_lib; print(get_python_lib(1))")}
+%define py2_setup setup.py
+%define py2_shbang_opts -s
+%define py2_build() %{expand:\
+ CFLAGS="%{optflags}" %{__python2} %{py2_setup} %{?py2_setup_args} build --executable="%{__python2} %{py2_shbang_opts}" %{?1}\
+}
+%define py2_install() %{expand:\
+ CFLAGS="%{optflags}" %{__python2} %{py2_setup} %{?py2_setup_args} install -O1 --skip-build --root %{buildroot} %{?1}\
+}
+%define py3_setup setup.py
+%define py3_shbang_opts -s
+%define py3_build() %{expand:\
+ CFLAGS="%{optflags}" %{__python3} %{py3_setup} %{?py3_setup_args} build --executable="%{__python3} %{py3_shbang_opts}" %{?1}\
+}
+%define py3_install() %{expand:\
+ CFLAGS="%{optflags}" %{__python3} %{py3_setup} %{?py3_setup_args} install -O1 --skip-build --root %{buildroot} %{?1}\
+}
+%define py3dir %{_builddir}/python3-%{name}-%{version}-%{release}
+
+
+%global with_python3 1
 
 %{!?python_sitelib: %define python_sitelib %(%{__python} -c "from distutils.sysconfig import get_python_lib; print get_python_lib()")}
 %global upstream_name Pygments
 
 Name:           python-pygments
-Version:        1.3.1
-Release:        3%{?_dist_release}
+Version:        2.1.3
+Release:        1%{?_dist_release}
 Summary:        A syntax highlighting engine written in Python
 
 Group:          Development/Libraries
@@ -95,12 +121,11 @@ popd
 %endif # with_python3
 
 %{__python} setup.py install -O1 --skip-build --root $RPM_BUILD_ROOT
-pushd docs
+pushd doc
 %__install -d %{buildroot}%{_mandir}/man1
 %__mv pygmentize.1 $RPM_BUILD_ROOT%{_mandir}/man1/pygmentize.1
-%__mv build html
-%__mv src reST
 popd
+cp -r doc/docs doc/reST
 
 
 %clean
@@ -113,14 +138,15 @@ popd
 # nose is not Python3 ready yet
 %if 0%{?with_python3}
 pushd %{py3dir}
-#make test
+make test
 popd
 %endif # with_python3
 
 
 %files
 %defattr(-,root,root,-)
-%doc AUTHORS CHANGES docs/html docs/reST LICENSE TODO
+%license LICENSE
+%doc AUTHORS CHANGES doc/reST TODO
 # For noarch packages: sitelib
 %{python_sitelib}/*
 %{_bindir}/pygmentize
@@ -129,12 +155,16 @@ popd
 %if 0%{?with_python3}
 %files -n python3-pygments
 %defattr(-,root,root,-)
-%doc AUTHORS CHANGES docs/html docs/reST LICENSE TODO
+%license LICENSE
+%doc AUTHORS CHANGES doc/reST TODO
 %{python3_sitelib}/*
 %endif # with_python3
 
 
 %changelog
+* Tue Jul 12 2016 Tomohiro "Tomo-p" KATO <tomop@teamgedoh.net> - 2.1.3-1
+- new upstream release.
+
 * Sun Jan 12 2014 Yoji TOYODA <bsyamato@sea.plala.or.jp> - 1.3.1-3
 - rebuild with VineSeed environment