Browse Source

python-babel-2.6.0-1

git-svn-id: http://trac.vinelinux.org/repos/projects/specs@11926 ec354946-7b23-47d6-9f5a-488ba84defc7
tomop 5 years ago
parent
commit
6210b8c7b6
1 changed files with 46 additions and 13 deletions
  1. 46 13
      p/python-babel/python-babel-vl.spec

+ 46 - 13
p/python-babel/python-babel-vl.spec

@@ -1,25 +1,30 @@
-%{!?python_sitelib:     %define python_sitelib %(%{__python} -c "from distutils.sysconfig import get_python_lib; print get_python_lib()")}
-
-%define ver 0.9.6
-%define rel 3
+%global srcname Babel
+%define ver 2.6.0
+%define rel 1
 
 Summary: A collection of tools for internationalizing Python applications
 Name: python-babel
 Version: %{ver}
 Release: %{rel}%{?_dist_release}
-Source0: http://ftp.edgewall.com/pub/babel/Babel-%{version}.tar.gz
+
 License: modified BSD-style License
 Group: Development/Libraries
-URL: http://babel.edgewall.org/
+URL: http://babel.pocoo.org/
 
-BuildRequires: python-setuptools
+Vendor: Project Vine
+Distribution: Vine Linux
 
 BuildRoot: %{_tmppath}/%{name}-%{version}-root
 BuildArch: noarch
 
-Vendor: Project Vine
-Distribution: Vine Linux
+Source0: https://files.pythonhosted.org/packages/source/B/%{srcname}/%{srcname}-%{version}.tar.gz
+Patch0: babel-2.3.4-remove-pytz-version.patch
 
+BuildRequires: python-setuptools, python-rpm-macros
+BuildRequires: python3-setuptools, python3-rpm-macros
+BuildRequires: python-pytz, python3-pytz
+
+%{?python_provide:%python_provide python2-babel}
 
 %description
 Babel is composed of two major parts:
@@ -29,16 +34,33 @@ Babel is composed of two major parts:
    providing access to various locale display names, localized number 
    and date formatting, etc. 
 
+%package -n python3-babel
+Summary: A collection of tools for internationalizing Python applications
+Requires: python3-setuptools
+Requires: python3-pytz
+
+%{?python_provide:%python_provide python3-babel}
+
+%description -n python3-babel
+Babel is composed of two major parts:
+
+* tools to build and work with gettext message catalogs
+
+* a Python interface to the CLDR (Common Locale Data Repository),
+  providing access to various locale display names, localized number
+  and date formatting, etc.
 
 %prep
-%setup -q -n Babel-%{version}
+%autosetup -n %{srcname}-%{version}
 
 %build
-%{__python} setup.py build
+%py3_build
+%py_build
 
 %install
 %{__rm} -rf ${RPM_BUILD_ROOT}
-%{__python} setup.py install --root=${RPM_BUILD_ROOT}
+%py3_install
+%py_install
 
 
 %clean
@@ -47,12 +69,23 @@ Babel is composed of two major parts:
 
 %files
 %defattr(-,root,root)
-%doc COPYING ChangeLog README.txt contrib doc scripts
+%doc CHANGES AUTHORS
+%license LICENSE
 %{_bindir}/pybabel
 %{python_sitelib}/Babel-*.egg-info
 %{python_sitelib}/babel
 
+%files -n python3-babel
+%doc CHANGES AUTHORS
+%license LICENSE
+%{python3_sitelib}/Babel-%{version}-py*.egg-info
+%{python3_sitelib}/babel
+
 %changelog
+* Tue Nov 27 2018 Tomohiro "Tomo-p" KATO <tomop@teamgedoh.net> 2.6.0-1
+- new upstream release.
+- added python3 support.
+
 * Sun Jan 12 2014 Yoji TOYODA <bsyamato@sea.plala.or.jp> 0.9.6-3
 - rebuild with VineSeed environment