diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..5724f1e --- /dev/null +++ b/.gitignore @@ -0,0 +1 @@ +/rsd-lib-0.1.1.tar.gz diff --git a/README.md b/README.md deleted file mode 100644 index 96b1c8f..0000000 --- a/README.md +++ /dev/null @@ -1,3 +0,0 @@ -# python-rsd-lib - -The python-rsd-lib package \ No newline at end of file diff --git a/python-rsd-lib.spec b/python-rsd-lib.spec new file mode 100644 index 0000000..90ed297 --- /dev/null +++ b/python-rsd-lib.spec @@ -0,0 +1,172 @@ +%{!?upstream_version: %global upstream_version %{version}%{?milestone}} +%if 0%{?fedora} +%global with_python3 1 +%endif + +%global sname rsd-lib +%global pyname rsd_lib + +Name: python-%{sname} +Version: 0.1.1 +Release: 1%{?dist} +Summary: Python library for interfacing with Intel Rack Scale Design enabled hardware. + +License: ASL 2.0 +URL: http://git.openstack.org/cgit/openstack/%{sname} +Source0: http://tarballs.openstack.org/%{sname}/%{sname}-%{upstream_version}.tar.gz +BuildArch: noarch + +%description +This library extends the existing Sushy library to include functionality for +Intel RackScale Design enabled hardware. Capabilities include logical node +composition and decomposition, remote storage discovery and composition, +and NVMe over PCIe drive attaching and detaching to logical nodes. + +%package -n python2-%{sname} +Summary: %{summary} +%{?python_provide:%python_provide python2-%{sname}} + +BuildRequires: python2-devel +BuildRequires: python-jsonschema +BuildRequires: python2-pbr >= 2.0 +BuildRequires: python-setuptools +BuildRequires: python-sushy >= 0.1.0 +BuildRequires: python2-sushy-tests >= 0.1.0 + +Requires: python-jsonschema +Requires: python2-pbr >= 2.0 +Requires: python-sushy >= 0.1.0 + +%description -n python2-%{sname} +This library extends the existing Sushy library to include functionality for +Intel RackScale Design enabled hardware. Capabilities include logical node +composition and decomposition, remote storage discovery and composition, +and NVMe over PCIe drive attaching and detaching to logical nodes. + +%package -n python2-%{sname}-tests +Summary: rsd-lib tests + +BuildRequires: python2-devel + +Requires: python2-%{sname} = %{version}-%{release} +Requires: python-jsonschema +Requires: python2-pbr +Requires: python-setuptools +Requires: python-sushy >= 0.1.0 +Requires: python2-sushy-tests >= 0.1.0 + +%description -n python2-%{sname}-tests +Tests for rsd-lib + +%if 0%{?with_python3} +%package -n python3-%{sname} +Summary: %{summary} + +%{?python_provide:%python_provide python3-%{sname}} +BuildRequires: python3-devel +BuildRequires: python3-jsonschema +BuildRequires: python3-pbr >= 2.0 +BuildRequires: python3-setuptools +BuildRequires: python3-sushy >= 0.1.0 +BuildRequires: python3-sushy-tests >= 0.1.0 + +Requires: python3-pbr >= 2.0 +Requires: python3-sushy >= 0.1.0 +Requires: python3-jsonschema + +%description -n python3-%{sname} +This library extends the existing Sushy library to include functionality for +Intel RackScale Design enabled hardware. Capabilities include logical node +composition and decomposition, remote storage discovery and composition, +and NVMe over PCIe drive attaching and detaching to logical nodes. + +%package -n python3-%{sname}-tests +Summary: rsd-lib tests + +BuildRequires: python3-devel + +Requires: python3-%{sname} = %{version}-%{release} +Requires: python3-jsonschema +Requires: python3-pbr +Requires: python3-setuptools +Requires: python3-sushy >= 0.1.0 +Requires: python3-sushy-tests >= 0.1.0 + +%description -n python3-%{sname}-tests +Tests for rsd-lib + +%endif # with_python3 + +%package -n python-%{sname}-doc +Summary: rsd-lib documentation + +BuildRequires: python-sphinx +BuildRequires: python-oslo-sphinx +BuildRequires: python-openstackdocstheme >= 1.11.0 + +%description -n python-%{sname}-doc +Documentation for rsd-lib + +%prep +%autosetup -n %{sname}-%{upstream_version} -S git + +# Let's handle dependencies ourseleves +rm -f *requirements.txt + +%build +%py2_build +%if 0%{?with_python3} +%py3_build +%endif + +# generate html docs +%{__python2} setup.py build_sphinx +# remove the sphinx-build leftovers +rm -rf doc/build/html/.{doctrees,buildinfo} + +%install +%py2_install +%if 0%{?with_python3} +%py3_install +%endif + +%check +%if 0%{?with_python3} +%{__python3} setup.py test +rm -rf .testrepository +%endif +%{__python2} setup.py test + +%files -n python2-%{sname} +%license LICENSE +%doc doc/source/readme.rst README.rst +%{python2_sitelib}/%{pyname} +%{python2_sitelib}/%{pyname}-*.egg-info +%exclude %{python2_sitelib}/%{pyname}/tests + +%files -n python2-%{sname}-tests +%license LICENSE +%{python2_sitelib}/%{pyname}/tests + +%if 0%{?with_python3} +%files -n python3-%{sname} +%license LICENSE +%doc doc/source/readme.rst README.rst +%{python3_sitelib}/%{pyname} +%{python3_sitelib}/%{pyname}-*.egg-info +%exclude %{python3_sitelib}/%{pyname}/tests + +%files -n python3-%{sname}-tests +%license LICENSE +%{python3_sitelib}/%{pyname}/tests + +%endif # with_python3 + +%files -n python-%{sname}-doc +%license LICENSE +%doc doc/build/html README.rst + +%changelog +* Fri Dec 22 2017 Alfredo Moralejo 0.1.1-1 +- Initial release + diff --git a/sources b/sources new file mode 100644 index 0000000..2631ed5 --- /dev/null +++ b/sources @@ -0,0 +1 @@ +SHA512 (rsd-lib-0.1.1.tar.gz) = 9ca582223bbf788377995e099597699755210973bd19b5ab911058f17185a26573db6f67b3c485dcfce6b5cded166d2355bf6cf8829d2b94765d14db544d723e