From dd3fd15b4c382e04a6591b31303cbfd1bcc536c9 Mon Sep 17 00:00:00 2001 From: Avram Lubkin Date: Jul 24 2018 14:24:08 +0000 Subject: Initial import (#1607543). --- diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..428e8c7 --- /dev/null +++ b/.gitignore @@ -0,0 +1 @@ +/pluginlib-0.5.1.tar.gz diff --git a/README.md b/README.md deleted file mode 100644 index 7529657..0000000 --- a/README.md +++ /dev/null @@ -1,3 +0,0 @@ -# python-pluginlib - -The python-pluginlib package \ No newline at end of file diff --git a/python-pluginlib.spec b/python-pluginlib.spec new file mode 100644 index 0000000..7d69a86 --- /dev/null +++ b/python-pluginlib.spec @@ -0,0 +1,167 @@ +%global pypi_name pluginlib +%global sum A framework for creating and importing plugins in Python +%global desc Pluginlib is a Python framework for creating and importing plugins.\ +Pluginlib makes creating plugins for your project simple. + +%bcond_without python3 + +# Drop Python 2 with Fedora 30 and EL8 +%if (0%{?fedora} && 0%{?fedora} < 30) || (0%{?rhel} && 0%{?rhel} < 8) + %bcond_without python2 +%else + %bcond_with python2 +%endif + + +Name: python-%{pypi_name} +Version: 0.5.1 +Release: 2%{?dist} +Summary: %{sum} + +License: MPLv2.0 +URL: https://github.com/Rockhopper-Technologies/pluginlib +Source0: https://files.pythonhosted.org/packages/source/p/%{pypi_name}/%{pypi_name}-%{version}.tar.gz +BuildArch: noarch + +%if %{with python2} +BuildRequires: python2-devel +BuildRequires: python2-setuptools +BuildRequires: python2-mock +%endif + +%if %{with python3} +BuildRequires: python%{python3_pkgversion}-devel +BuildRequires: python%{python3_pkgversion}-setuptools +%endif + +%if 0%{?with_python3_other} +BuildRequires: python%{python3_other_pkgversion}-devel +BuildRequires: python%{python3_other_pkgversion}-setuptools +%endif + +# Additional build requirements for Python 2.6 +%if 0%{?el6} +BuildRequires: python-unittest2 +BuildRequires: python-importlib +%endif + +%description +%{desc} + + +# Python 2 package +%if %{with python2} +%package -n python2-%{pypi_name} + +Summary: %{sum} +%{?python_provide:%python_provide python2-%{pypi_name}} +Requires: python2-setuptools + +%if 0%{?el6} +Requires: python-importlib +%endif + +%description -n python2-%{pypi_name} +%{desc} +%endif + +# Python 3 package +%if %{with python3} +%package -n python%{python3_pkgversion}-%{pypi_name} +Summary: %{sum} +%{?python_provide:%python_provide python%{python3_pkgversion}-%{pypi_name}} +Requires: python%{python3_pkgversion}-setuptools + +%description -n python%{python3_pkgversion}-%{pypi_name} +%{desc} +%endif + +# Python 3 other package +%if 0%{?with_python3_other} +%package -n python%{python3_other_pkgversion}-%{pypi_name} +Summary: %{sum} +%{?python_provide:%python_provide python%{python3_other_pkgversion}-%{pypi_name}} +Requires: python%{python3_other_pkgversion}-setuptools + +%description -n python%{python3_other_pkgversion}-%{pypi_name} +%{desc} +%endif + + +%prep +%autosetup -p0 -n %{pypi_name}-%{version} + +# Remove bundled egg-info +rm -rf %{pypi_name}.egg-info + + +%build +%if %{with python2} +%py2_build +%endif + +%if %{with python3} +%py3_build +%endif + +%if 0%{?with_python3_other} +%py3_other_build +%endif + + +%install +%if 0%{?with_python3_other} +%py3_other_install +%endif + +%if %{with python3} +%py3_install +%endif + +%if %{with python2} +%py2_install +%endif + + +%check +%if %{with python2} +%{__python2} setup.py test +%endif + +%if %{with python3} +%{__python3} setup.py test +%endif + +%if 0%{?with_python3_other} +%{__python3_other} setup.py test +%endif + + +%if %{with python2} +%files -n python2-%{pypi_name} +%doc README* +%license LICENSE +%{python2_sitelib}/pluginlib* +%endif + +%if %{with python3} +%files -n python%{python3_pkgversion}-%{pypi_name} +%doc README* +%license LICENSE +%{python3_sitelib}/pluginlib* +%endif + +%if 0%{?with_python3_other} +%files -n python%{python3_other_pkgversion}-%{pypi_name} +%doc README* +%license LICENSE +%{python3_other_sitelib}/pluginlib* +%endif + +%changelog +* Mon Jul 23 2018 Avram Lubkin - 0.5.1-2 +- Change with_pythonX to use bcond_with(out) +- Make files sections more specific + +* Mon Jul 23 2018 Avram Lubkin - 0.5.1-1 +- Initial package. diff --git a/sources b/sources new file mode 100644 index 0000000..0738347 --- /dev/null +++ b/sources @@ -0,0 +1 @@ +SHA512 (pluginlib-0.5.1.tar.gz) = eeb04a48e692c42c987a4b21f1c48a3ebf9001d5f002e5e947c890de40f06b7bd3a1a8c123af512f0c4e54ba94a569dc59afdb01f75a279f4d93c96527608b1a