commit 0b3864afed9195fa1516723dab09eafd91e6e5e4
Author: Jacek Konieczny <[email protected]>
Date:   Tue Nov 24 09:40:04 2015 +0100

    new package

 python-mechanicalsoup.spec | 94 ++++++++++++++++++++++++++++++++++++++++++++++
 1 file changed, 94 insertions(+)
---
diff --git a/python-mechanicalsoup.spec b/python-mechanicalsoup.spec
new file mode 100644
index 0000000..a4accc8
--- /dev/null
+++ b/python-mechanicalsoup.spec
@@ -0,0 +1,94 @@
+#
+# Conditional build:
+%bcond_without python2 # CPython 2.x module
+%bcond_without python3 # CPython 3.x module
+
+%define        module  mechanicalsoup
+Summary:       A Python library for automating interaction with websites
+Name:          python-%{module}
+Version:       0.3.1
+Release:       1
+License:       MIT
+Group:         Libraries/Python
+Source0:       
https://pypi.python.org/packages/source/M/MechanicalSoup/MechanicalSoup-%{version}.zip
+# Source0-md5: b60b0f0f1bc5eb3652ea5f0c6b7d24c1
+URL:           https://github.com/hickford/MechanicalSoup
+BuildRequires: rpm-pythonprov
+%if %{with python2}
+BuildRequires: python-setuptools
+%endif
+%if %{with python3}
+BuildRequires: python3-setuptools
+%endif
+Requires:      python-bs4
+Requires:      python-requests
+Requires:      python-six
+BuildArch:     noarch
+BuildRoot:     %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
+
+%description
+A Python library for automating interaction with websites.
+MechanicalSoup automatically stores and sends cookies, follows
+redirects, and can follow links and submit forms. It doesn't do
+Javascript.
+
+%package -n python3-%{module}
+Summary:       A Python library for automating interaction with websites
+Group:         Libraries/Python
+Requires:      python3-bs4
+Requires:      python3-requests
+Requires:      python3-six
+
+%description -n python3-%{module}
+A Python library for automating interaction with websites.
+MechanicalSoup automatically stores and sends cookies, follows
+redirects, and can follow links and submit forms. It doesn't do
+Javascript.
+
+%prep
+%setup -q -n MechanicalSoup-%{version}
+
+%build
+%if %{with python2}
+%{__python} setup.py build --build-base build-2 %{?with_tests:test}
+%endif
+
+%if %{with python3}
+%{__python3} setup.py build --build-base build-3 %{?with_tests:test}
+%endif
+
+%install
+rm -rf $RPM_BUILD_ROOT
+
+%if %{with python2}
+%{__python} setup.py \
+       build --build-base build-2 \
+       install --skip-build \
+       --optimize=2 \
+       --root=$RPM_BUILD_ROOT
+%endif
+
+%if %{with python3}
+%{__python3} setup.py \
+       build --build-base build-3 \
+       install --skip-build \
+       --optimize=2 \
+       --root=$RPM_BUILD_ROOT
+%endif
+
+%clean
+rm -rf $RPM_BUILD_ROOT
+
+%if %{with python2}
+%files
+%defattr(644,root,root,755)
+%{py_sitescriptdir}/mechanicalsoup
+%{py_sitescriptdir}/MechanicalSoup-%{version}-py*.egg-info
+%endif
+
+%if %{with python3}
+%files -n python3-%{module}
+%defattr(644,root,root,755)
+%{py3_sitescriptdir}/mechanicalsoup
+%{py3_sitescriptdir}/MechanicalSoup-%{version}-py*.egg-info
+%endif
================================================================

---- gitweb:

http://git.pld-linux.org/gitweb.cgi/packages/python-mechanicalsoup.git/commitdiff/0b3864afed9195fa1516723dab09eafd91e6e5e4

_______________________________________________
pld-cvs-commit mailing list
[email protected]
http://lists.pld-linux.org/mailman/listinfo/pld-cvs-commit

Reply via email to