lmacken pushed to python-rxjson (epel7). "Initial package for Fedora (..more)"

notifications at fedoraproject.org notifications at fedoraproject.org
Tue May 5 13:39:19 UTC 2015


>From 80b3404c8d54d62068c794803aad3c0456619efc Mon Sep 17 00:00:00 2001
From: Mathieu Bridon <bochecha at fedoraproject.org>
Date: Mon, 2 Jun 2014 14:12:32 -0600
Subject: Initial package for Fedora

Submitted on Mon Jun 02 2014:
    https://bugzilla.redhat.com/show_bug.cgi?id=1103897

diff --git a/.gitignore b/.gitignore
index e69de29..07d4ac7 100644
--- a/.gitignore
+++ b/.gitignore
@@ -0,0 +1 @@
+/rxjson-0.2.tar.gz
diff --git a/python-rxjson.spec b/python-rxjson.spec
new file mode 100644
index 0000000..573d132
--- /dev/null
+++ b/python-rxjson.spec
@@ -0,0 +1,97 @@
+%global module rxjson
+
+%if 0%{?fedora}
+%global with_python3 1
+%else
+# EL doesn't have Python 3
+%global with_python3 0
+%endif
+
+%if 0%{?rhel} || 0%{?rhel} < 7
+# EL 6 doesn't have this macro
+%global __python2       %{__python}
+%global python2_sitelib %{python_sitelib}
+%endif
+
+Name:             python-rxjson
+Summary:          JSON RX Schema validation tool
+Version:          0.2
+Release:          1%{?dist}
+
+License:          GPLv2
+URL:              https://pypi.python.org/pypi/%{module}
+Source0:          https://pypi.python.org/packages/source/r/%{module}/%{module}-%{version}.tar.gz
+
+BuildArch:        noarch
+
+BuildRequires:    python2-devel
+BuildRequires:    python-setuptools
+BuildRequires:    python-d2to1
+
+%description
+JSON RX Schema validation tool.
+
+
+%if %{with_python3}
+%package -n python3-rxjson
+Summary:          JSON RX Schema validation tool
+
+BuildRequires:    python3-devel
+BuildRequires:    python3-setuptools
+BuildRequires:    python3-d2to1
+
+%description -n python3-rxjson
+JSON RX Schema validation tool.
+%endif
+
+
+%prep
+%setup -q -n %{module}-%{version}
+
+%if %{with_python3}
+rm -rf %{py3dir}
+cp -a . %{py3dir}
+find %{py3dir} -name '*.py' | xargs sed -i '1s|^#!python|#!%{__python3}|'
+%endif
+
+
+%build
+CFLAGS="$RPM_OPT_FLAGS" %{__python2} setup.py build
+
+%if %{with_python3}
+pushd %{py3dir}
+# Default encoding is 'ascii' if we don't set a UTF-8 locale, and setup.cfg
+# contains some non-ascii characters
+LC_ALL=en_US.UTF-8 LANG=en_US.UTF-8 \
+    CFLAGS="$RPM_OPT_FLAGS" %{__python3} setup.py build
+popd
+%endif
+
+
+%install
+%if %{with_python3}
+pushd %{py3dir}
+# Default encoding is 'ascii' if we don't set a UTF-8 locale, and setup.cfg
+# contains some non-ascii characters
+LC_ALL=en_US.UTF-8 LANG=en_US.UTF-8 \
+    %{__python3} setup.py install --skip-build --root %{buildroot}
+popd
+%endif
+
+%{__python2} setup.py install --skip-build --root %{buildroot}
+
+
+%files
+%doc README.rst
+%{python2_sitelib}/%{module}*
+
+%if %{with_python3}
+%files -n python3-rxjson
+%doc README.rst
+%{python3_sitelib}/%{module}*
+%endif
+
+
+%changelog
+* Mon Jun 02 2014 Mathieu Bridon <bochecha at fedoraproject.org> - 0.2-1
+- Initial package for Fedora.
diff --git a/sources b/sources
index e69de29..b04f44c 100644
--- a/sources
+++ b/sources
@@ -0,0 +1 @@
+0c4516b39ab02f41275ec1e4153d2ecf  rxjson-0.2.tar.gz
-- 
cgit v0.10.2


	http://pkgs.fedoraproject.org/cgit/python-rxjson.git/commit/?h=epel7&id=80b3404c8d54d62068c794803aad3c0456619efc


More information about the scm-commits mailing list