summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--MANIFEST.in1
-rw-r--r--python-glusterfs-api.spec85
2 files changed, 33 insertions, 53 deletions
diff --git a/MANIFEST.in b/MANIFEST.in
index ce51ba3..dd88d06 100644
--- a/MANIFEST.in
+++ b/MANIFEST.in
@@ -1,5 +1,6 @@
include README.rst COPYING-GPLV2 COPYING-LGPLV3 MAINTAINERS
include .functests .unittests test-requirements.txt tox.ini test/test.conf
+include python-glusterfs-api.spec
recursive-include gluster *.py
recursive-include test *.py
graft doc
diff --git a/python-glusterfs-api.spec b/python-glusterfs-api.spec
index 38aa0bc..e344a06 100644
--- a/python-glusterfs-api.spec
+++ b/python-glusterfs-api.spec
@@ -1,79 +1,58 @@
+# What's in a name ? :‑O
+#
+# * The source repo is named libgfapi-python
+# * The python package is named gfapi
+# * The RPM package is named python-glusterfs-api to be analogous to
+# glusterfs-api RPM which provides the libgfapi C library
-# From https://fedoraproject.org/wiki/Packaging:Python#Macros
-%if ( 0%{?rhel} && 0%{?rhel} <= 5 )
-%{!?python_sitelib: %global python_sitelib %(python -c "from distutils.sysconfig import get_python_lib; print(get_python_lib())")}
-%{!?python_sitearch: %global python_sitearch %(python -c "from distutils.sysconfig import get_python_lib; print(get_python_lib(1))")}
-%endif
+%global python_package_name gfapi
Name: python-glusterfs-api
-Summary: python binding of Gluster libgfapi
-Version: 1.0.0
+Summary: Python bindings for GlusterFS libgfapi
+Version: 1.1
Release: 1%{?dist}
License: GPLv2 or LGPLv3+
-BuildArch: noarch
+Group: System Environment/Libraries
+Vendor: Gluster Community
URL: https://github.com/gluster/libgfapi-python
-Vendor: gluster.org
-Source0: %{name}-%{version}.tar.gz
-BuildRoot: %{_tmppath}/%{name}-%{version}-root
-#at build time
+Source0: https://files.pythonhosted.org/packages/source/g/gfapi/%{python_package_name}-%{version}.tar.gz
+
+BuildArch: noarch
BuildRequires: python-setuptools
-BuildRequires: python2-devel
-#at time of run
-Requires: python
-Requires: python-ctypes
-Requires: glusterfs-api >= 3.6.1
+
+# Provides libgfapi.so
+Requires: glusterfs-api >= 3.7.0
+# Provides gluster/__init__.py
Requires: python-gluster >= 3.7.0
%description
-GlusterFS is a distributed file-system capable of scaling to several
-petabytes. It aggregates various storage bricks over Infiniband RDMA
-or TCP/IP interconnect into one large parallel network file
-system. GlusterFS is one of the most sophisticated file systems in
-terms of features and extensibility. It borrows a powerful concept
-called Translators from GNU Hurd kernel. Much of the code in GlusterFS
-is in user space and easily manageable.
+libgfapi is a library that allows applications to natively access GlusterFS
+volumes. This package contains python bindings to libgfapi.
-libgfapi is one of the access mechanism for GlusterFS volumes and this package
-contains python bindings of libgfapi.
+See http://libgfapi-python.rtfd.io/ for more details.
%prep
-%setup -q
-
+%setup -q -n %{python_package_name}-%{version}
%build
-%{__python} setup.py build
-
+%{__python2} setup.py build
%install
rm -rf %{buildroot}
-mkdir -p %{buildroot}/%{python2_sitelib}/gluster/gfapi/
-%{__python2} setup.py install --skip-build --verbose --root %{buildroot}
-mv %{buildroot}/%{python2_sitelib}/gluster/gfapi.py* %{buildroot}/%{python2_sitelib}/gluster/gfapi/
-mv %{buildroot}/%{python2_sitelib}/gluster/api.py* %{buildroot}/%{python2_sitelib}/gluster/gfapi/
-mv %{buildroot}/%{python2_sitelib}/gluster/__init__.py* %{buildroot}/%{python2_sitelib}/gluster/gfapi/
-
-
+%{__python2} setup.py install --skip-build --root %{buildroot}
%files
-%doc README.md
-%{python2_sitelib}/gluster/gfapi/
-# Don't expect a .egg-info file on EL5
-%if ( ! ( 0%{?rhel} && 0%{?rhel} < 6 ) )
-%{python_sitelib}/*.egg-info
-%endif
-# unit and functional test files are part of source, however we are not packaging it, so adding them in
-# exclude.
-%exclude %{buildroot}/test/
-%exclude %{buildroot}/functional_tests.sh
-%exclude %{buildroot}/test-requirements.txt
-%exclude %{buildroot}/tox.ini
-%exclude %{buildroot}/unittests.sh
-
-%{!?_licensedir:%global license %%doc}
-
+%doc README.rst
%license COPYING-GPLV2 COPYING-LGPLV3
+%{python2_sitelib}/*
+# As weird as it may seem, excluding __init__.py[co] is intentional as
+# it is provided by python-gluster package which is a dependency.
+%exclude %{python2_sitelib}/gluster/__init__*
%changelog
+* Tue Aug 9 2016 Prashanth Pai <ppai@redhat.com> - 1.1-1
+- Update spec file
+
* Wed May 20 2015 Humble Chirammal <hchiramm@redhat.com> - 1.0.0-1
- Change Package name to python-glusterfs-api instead of python-gluster-gfapi.