From 2184a4f65c968c9548da621ba2501a4195e7a06a Mon Sep 17 00:00:00 2001 From: David Shea Date: Fri, 8 May 2015 15:58:33 -0400 Subject: [PATCH] Initial package --- .gitignore | 1 + python-requests-file.spec | 105 ++++++++++++++++++++++++++++++++++++++ sources | 1 + 3 files changed, 107 insertions(+) create mode 100644 python-requests-file.spec diff --git a/.gitignore b/.gitignore index e69de29..d1a16f8 100644 --- a/.gitignore +++ b/.gitignore @@ -0,0 +1 @@ +/requests-file-1.2.tar.gz diff --git a/python-requests-file.spec b/python-requests-file.spec new file mode 100644 index 0000000..41ed23d --- /dev/null +++ b/python-requests-file.spec @@ -0,0 +1,105 @@ +Name: python-requests-file +Version: 1.2 +Release: 1%{?dist} +Summary: Transport adapter for using file:// URLs with python-requests + +License: ASL 2.0 +URL: https://github.com/dashea/requests-file +Source0: https://pypi.python.org/packages/source/r/requests-file/requests-file-%{version}.tar.gz + +BuildArch: noarch + +BuildRequires: python2-devel +BuildRequires: python-setuptools +BuildRequires: python-requests +BuildRequires: python-six + +Requires: python-requests +Requires: python-six + +%description +Requests-File is a transport adapter for use with the Requests Python +library to allow local file system access via file:// URLs. + +This is the Python 2 version of the requests_file module + +%package -n python3-requests-file +Summary: Transport adapter for using file:// URLs with python3-requests + +BuildRequires: python3-devel +BuildRequires: python3-setuptools +BuildRequires: python3-requests +BuildRequires: python3-six + +Requires: python3-requests +Requires: python3-six + +%description -n python3-requests-file +Requests-File is a transport adapter for use with the Requests Python +library to allow local file system access via file:// URLs. + +This is the Python 3 version of the requests_file module + +%prep +%setup -qc +mv requests-file-%{version} python2 +pushd python2 +rm -rf requests_file.egg-info + +# Copy common doc files to top dir +cp -pr LICENSE README.rst ../ + +popd + +cp -a python2 python3 + +%build +pushd python2 +%{__python2} setup.py build +popd + +pushd python3 +%{__python3} setup.py build +popd + +%install +pushd python2 +%{__python2} setup.py install --skip-build --root %{buildroot} +popd + +pushd python3 +%{__python3} setup.py install --skip-build --root %{buildroot} +popd + +%check +pushd python2 +%{__python2} setup.py test +popd + +pushd python3 +%{__python3} setup.py test +popd + +%files +%license LICENSE +%doc README.rst +%{python2_sitelib}/requests_file.py* +%{python2_sitelib}/requests_file*.egg-info* + +%files -n python3-requests-file +%license LICENSE +%doc README.rst +%{python3_sitelib}/requests_file.py* +%{python3_sitelib}/__pycache__/requests_file.* +%{python3_sitelib}/requests_file*.egg-info* + +%changelog +* Fri May 8 2015 David Shea - 1.2-1 +- Added support for HEAD requests + +* Thu Mar 12 2015 David Shea - 1.1-1 +- Added handing for %% escapes in URLs +- Proofread the README + +* Tue Mar 10 2015 David Shea - 1.0-1 +- Initial package diff --git a/sources b/sources index e69de29..66e64c9 100644 --- a/sources +++ b/sources @@ -0,0 +1 @@ +5674e9aa581039c77d4551ed691dbd59 requests-file-1.2.tar.gz