From 1dbefb04640f99febe1df45ab1f3208198281d9b Mon Sep 17 00:00:00 2001 From: Aurélien Bompard Date: Aug 29 2017 17:13:47 +0000 Subject: Initial import (#1482145). --- diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..a47eddc --- /dev/null +++ b/.gitignore @@ -0,0 +1,2 @@ +/pyasn1-0.1.9.tar.gz +/pyasn1-modules-0.0.8.tar.gz diff --git a/README.md b/README.md deleted file mode 100644 index 7fd4243..0000000 --- a/README.md +++ /dev/null @@ -1,3 +0,0 @@ -# python3-pyasn1 - -The python3-pyasn1 package \ No newline at end of file diff --git a/python3-pyasn1.spec b/python3-pyasn1.spec new file mode 100644 index 0000000..fa3ba9b --- /dev/null +++ b/python3-pyasn1.spec @@ -0,0 +1,135 @@ +%global srcname pyasn1 +%global modules_version 0.0.8 +%global sum ASN.1 tools for Python +%global sum_modules Modules for pyasn1 +%global pkgdesc \ +This is an implementation of ASN.1 types and codecs in the Python \ +programming language. +%global pkgdesc_modules \ +ASN.1 types modules for python-pyasn1. + + +Name: python3-%{srcname} +Version: 0.1.9 +Release: 1%{?dist} +Summary: %{sum} +License: BSD +Group: System Environment/Libraries +Source0: https://downloads.sourceforge.net/%{srcname}/%{srcname}-%{version}.tar.gz +Source1: https://downloads.sourceforge.net/pyasn1/pyasn1-modules-%{modules_version}.tar.gz +URL: http://pyasn1.sourceforge.net/ +BuildArch: noarch +BuildRequires: python-srpm-macros +BuildRequires: python%{python3_pkgversion}-devel +BuildRequires: python%{python3_pkgversion}-setuptools +%if 0%{?with_python3_other} +BuildRequires: python%{python3_other_pkgversion}-devel +BuildRequires: python%{python3_other_pkgversion}-setuptools +%endif + +%description %{pkgdesc} + + +%if %{python3_pkgversion} != 3 +%package -n python%{python3_pkgversion}-%{srcname} +Summary: %{sum} %{python3_pkgversion} +%{?python_provide:%python_provide python%{python3_pkgversion}-%{srcname}} + +%description -n python%{python3_pkgversion}-%{srcname} %{pkgdesc} +%endif + +%package -n python%{python3_pkgversion}-%{srcname}-modules +Summary: %{sum_modules} +Requires: python%{python3_pkgversion}-%{srcname} >= %{version}-%{release} +%{?python_provide:%python_provide python%{python3_pkgversion}-%{srcname}-modules} + +%description -n python%{python3_pkgversion}-%{srcname}-modules %{pkgdesc_modules} + + +%if 0%{?with_python3_other} +%package -n python%{python3_other_pkgversion}-%{srcname} +Summary: %{sum} %{python3_other_pkgversion} +%{?python_provide:%python_provide python%{python3_other_pkgversion}-%{srcname}} + +%description -n python%{python3_other_pkgversion}-%{srcname} %{pkgdesc} + +%package -n python%{python3_other_pkgversion}-%{srcname}-modules +Summary: %{sum_modules} +%{?python_provide:%python_provide python%{python3_other_pkgversion}-%{srcname}-modules} + +%description -n python%{python3_other_pkgversion}-%{srcname}-modules %{pkgdesc_modules} +%endif + + +%prep +%setup -n %{srcname}-%{version} -q -b1 + +%build +%py3_build +pushd ../pyasn1-modules-%{modules_version} +%py3_build +popd + +%if 0%{?with_python3_other} +%py3_other_build +pushd ../pyasn1-modules-%{modules_version} +%py3_other_build +popd +%endif + + +%install +%py3_install +pushd ../pyasn1-modules-%{modules_version} +%py3_install +popd + +%if 0%{?with_python3_other} +%py3_other_install +pushd ../pyasn1-modules-%{modules_version} +%py3_other_install +popd +%endif + + +%check +# PYTHONPATH is required because the the tests expect python3-pyasn1 +# to be installed. +PYTHONPATH="$RPM_BUILD_ROOT%{python3_sitelib}:$PYTHONPATH" %{__python3} setup.py test +%if 0%{?with_python3_other} +PYTHONPATH="$RPM_BUILD_ROOT%{python3_other_sitelib}:$PYTHONPATH" %{__python3_other} setup.py test +%endif + + +%files -n python%{python3_pkgversion}-%{srcname} +%doc README.txt doc +%license LICENSE.txt +%{python3_sitelib}/%{srcname} +%{python3_sitelib}/%{srcname}-%{version}-*.egg-info/ + +%files -n python%{python3_pkgversion}-%{srcname}-modules +%doc README.txt +%license LICENSE.txt +%{python3_sitelib}/%{srcname}_modules/ +%{python3_sitelib}/%{srcname}_modules-%{modules_version}-*.egg-info/ + +%if 0%{?with_python3_other} +%files -n python%{python3_other_pkgversion}-%{srcname} +%doc README.txt doc +%license LICENSE.txt +%{python3_other_sitelib}/%{srcname} +%{python3_other_sitelib}/%{srcname}-%{version}-*.egg-info/ + +%files -n python%{python3_other_pkgversion}-%{srcname}-modules +%doc README.txt +%license LICENSE.txt +%{python3_other_sitelib}/%{srcname}_modules/ +%{python3_other_sitelib}/%{srcname}_modules-%{modules_version}-*.egg-info/ +%endif + + +%changelog +* Wed Aug 16 2017 Aurelien Bompard - 0.1.9-1 +- Build for Python3-only on EPEL from the Fedora spec. + http://fedoraproject.org/wiki/PackagingDrafts:Python3EPEL +- Modernize the spec a bit (macros) diff --git a/sources b/sources new file mode 100644 index 0000000..7cf9455 --- /dev/null +++ b/sources @@ -0,0 +1,2 @@ +SHA512 (pyasn1-0.1.9.tar.gz) = c72bdba84c4cc860a1790d752861dc9de30dabb61e5146a551597b4a97e64797dbd6e575e61cb9a8b23ffc58bced143b0ed55a7c98d0a85834ccd60b17856df5 +SHA512 (pyasn1-modules-0.0.8.tar.gz) = 6040d4f83c6b00f7a0e6ba0e1264090d0fa96fc39e97b04d624721cef200b6cf4dabfe550127ade4edc181187ca1b4219fb46a95082a39e6291d0e2e08f36d78