public inbox for git-commits@fedoraproject.org
help / color / mirror / Atom feed
* [rpms/python-translationstring] epel10: Lay the groundwork for a python3 subpackage.
@ 2026-07-08 22:59 Ralph Bean
0 siblings, 0 replies; only message in thread
From: Ralph Bean @ 2026-07-08 22:59 UTC (permalink / raw)
To: git-commits
A new commit has been pushed.
Repo : rpms/python-translationstring
Branch : epel10
Commit : c28be9f02c59e860ae43ae1478089fae385fb2ab
Author : Ralph Bean <rbean@redhat.com>
Date : 2012-12-07T22:51:24-05:00
Stats : +80/-8 in 1 file(s)
URL : https://src.fedoraproject.org/rpms/python-translationstring/c/c28be9f02c59e860ae43ae1478089fae385fb2ab?branch=epel10
Log:
Lay the groundwork for a python3 subpackage.
---
diff --git a/python-translationstring.spec b/python-translationstring.spec
index aac02bc..d6f701b 100644
--- a/python-translationstring.spec
+++ b/python-translationstring.spec
@@ -1,8 +1,15 @@
+%if 0%{?fedora} > 12 || 0%{?rhel} > 6
+#%%global with_python3 1
+# Building the python3-translationstring subpackage is explicitly disabled
+# until we can package python3-babel. We're almost there..
+%global with_python3 0
+%endif
+
%global modname translationstring
Name: python-translationstring
Version: 1.1
-Release: 2%{?dist}
+Release: 3%{?dist}
Summary: Utility library for i18n relied on by various Repoze packages
Group: Development/Libraries
@@ -12,10 +19,19 @@ Source0: http://pypi.python.org/packages/source/t/translationstring/%{mod
BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
BuildArch: noarch
-BuildRequires: python-babel
BuildRequires: python2-devel
BuildRequires: python-setuptools-devel
+BuildRequires: python-babel
+
+%if 0%{?with_python3}
+BuildRequires: python3-devel
+BuildRequires: python3-setuptools
+
+BuildRequires: python3-babel
+%endif
+
+
%description
A library used by various `Repoze <http://repoze.org>`_ packages for
internationalization (i18n) duties related to translation.
@@ -28,28 +44,84 @@ facilities of this package. It does not depend on `Babel
are meant to work best when provided with an instance of the
``babel.support.Translations`` class.
+%if 0%{?with_python3}
+%package -n python3-translationstring
+Summary: Utility library for i18n relied on by various Repoze packages
+Group: Development/Libraries
+
+%description -n python3-translationstring
+A library used by various `Repoze <http://repoze.org>`_ packages for
+internationalization (i18n) duties related to translation.
+
+This package provides a *translation string* class, a *translation string
+factory* class, translation and pluralization primitives, and a utility that
+helps `Chameleon <http://chameleon.repoze.org>`_ templates use translation
+facilities of this package. It does not depend on `Babel
+<http://babel.edgewall.org>`_, but its translation and pluralization services
+are meant to work best when provided with an instance of the
+``babel.support.Translations`` class.
+%endif
+
%prep
%setup -q -n %{modname}-%{version}
+# Remove bundled egg info if it exists.
+rm -rf %{modname}.egg-info
+
+%if 0%{?with_python3}
+rm -rf %{py3dir}
+cp -a . %{py3dir}
+%endif
+
+
%build
%{__python} setup.py build
+%if 0%{?with_python3}
+pushd %{py3dir}
+%{__python3} setup.py build
+popd
+%endif
+
%install
-rm -rf %{buildroot}
+%if 0%{?with_python3}
+pushd %{py3dir}
+%{__python3} setup.py install -O1 --skip-build --root %{buildroot}
+popd
+%endif
+
%{__python} setup.py install -O1 --skip-build --root %{buildroot}
%check
-%{__python} setup.py test
+%if 0%{?with_python3}
+pushd %{py3dir}
+%{__python3} setup.py test
+popd
+%endif
-%clean
-rm -rf %{buildroot}
+%{__python} setup.py test
%files
-%defattr(-,root,root,-)
%doc README.txt LICENSE.txt
-%{python_sitelib}/*
+%{python_sitelib}/%{modname}/
+%{python_sitelib}/%{modname}-%{version}*.egg-info
+
+%if 0%{?with_python3}
+%files -n python3-translationstring
+%doc README.txt LICENSE.txt
+%{python3_sitelib}/%{modname}/
+%{python3_sitelib}/%{modname}-%{version}*.egg-info
+%endif
+
%changelog
+* Fri Dec 07 2012 Ralph Bean <rbean@redhat.com> - 1.1-3
+- Laid groundwork for packaging python3 support. Waiting on python3-babel.
+- Removed unnecessary defattr.
+- Removed unnecessary removal of the buildroot.
+- Removed unnecessary clean section.
+- Removed bundled egg-info.
+
* Sat Jul 21 2012 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 1.1-2
- Rebuilt for https://fedoraproject.org/wiki/Fedora_18_Mass_Rebuild
^ permalink raw reply related [flat|nested] only message in thread
only message in thread, other threads:[~2026-07-08 22:59 UTC | newest]
Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2026-07-08 22:59 [rpms/python-translationstring] epel10: Lay the groundwork for a python3 subpackage Ralph Bean
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox