diff options
author | CoprDistGit <infra@openeuler.org> | 2023-05-18 04:43:27 +0000 |
---|---|---|
committer | CoprDistGit <infra@openeuler.org> | 2023-05-18 04:43:27 +0000 |
commit | 45dc5e7610388de7259ac88f20bcffb7b4013b96 (patch) | |
tree | d2ae683663943e61f95b0e2cb33f68f0ff0a1974 | |
parent | 8ee67922464482cdebc494834e8fbce8abefcaf1 (diff) |
automatic import of python-multipartposthandler
-rw-r--r-- | .gitignore | 1 | ||||
-rw-r--r-- | python-multipartposthandler.spec | 135 | ||||
-rw-r--r-- | sources | 1 |
3 files changed, 137 insertions, 0 deletions
@@ -0,0 +1 @@ +/MultipartPostHandler-0.1.0.tar.gz diff --git a/python-multipartposthandler.spec b/python-multipartposthandler.spec new file mode 100644 index 0000000..89a45a1 --- /dev/null +++ b/python-multipartposthandler.spec @@ -0,0 +1,135 @@ +%global _empty_manifest_terminate_build 0 +Name: python-MultipartPostHandler +Version: 0.1.0 +Release: 1 +Summary: A handler for urllib2 to enable multipart form uploading +License: UNKNOWN +URL: http://pipe.scs.fsu.edu/PostHandler/MultipartPostHandler.py +Source0: https://mirrors.nju.edu.cn/pypi/web/packages/18/48/ba7c00a469cc0a0a7c19deebff844f15779256c209a4992e06e0f511ae36/MultipartPostHandler-0.1.0.tar.gz +BuildArch: noarch + + +%description +Usage: + Enables the use of multipart/form-data for posting forms + +Inspirations: + Upload files in python: + http://aspn.activestate.com/ASPN/Cookbook/Python/Recipe/146306 + urllib2_file: + Fabien Seisen: <fabien@seisen.org> + +Example: + import MultipartPostHandler, urllib2, cookielib + + cookies = cookielib.CookieJar() + opener = urllib2.build_opener(urllib2.HTTPCookieProcessor(cookies), + MultipartPostHandler.MultipartPostHandler) + params = { "username" : "bob", "password" : "riviera", + "file" : open("filename", "rb") } + opener.open("http://wwww.bobsite.com/upload/", params) + +Further Example: + The main function of this file is a sample which downloads a page and + then uploads it to the W3C validator. + +%package -n python3-MultipartPostHandler +Summary: A handler for urllib2 to enable multipart form uploading +Provides: python-MultipartPostHandler +BuildRequires: python3-devel +BuildRequires: python3-setuptools +BuildRequires: python3-pip +%description -n python3-MultipartPostHandler +Usage: + Enables the use of multipart/form-data for posting forms + +Inspirations: + Upload files in python: + http://aspn.activestate.com/ASPN/Cookbook/Python/Recipe/146306 + urllib2_file: + Fabien Seisen: <fabien@seisen.org> + +Example: + import MultipartPostHandler, urllib2, cookielib + + cookies = cookielib.CookieJar() + opener = urllib2.build_opener(urllib2.HTTPCookieProcessor(cookies), + MultipartPostHandler.MultipartPostHandler) + params = { "username" : "bob", "password" : "riviera", + "file" : open("filename", "rb") } + opener.open("http://wwww.bobsite.com/upload/", params) + +Further Example: + The main function of this file is a sample which downloads a page and + then uploads it to the W3C validator. + +%package help +Summary: Development documents and examples for MultipartPostHandler +Provides: python3-MultipartPostHandler-doc +%description help +Usage: + Enables the use of multipart/form-data for posting forms + +Inspirations: + Upload files in python: + http://aspn.activestate.com/ASPN/Cookbook/Python/Recipe/146306 + urllib2_file: + Fabien Seisen: <fabien@seisen.org> + +Example: + import MultipartPostHandler, urllib2, cookielib + + cookies = cookielib.CookieJar() + opener = urllib2.build_opener(urllib2.HTTPCookieProcessor(cookies), + MultipartPostHandler.MultipartPostHandler) + params = { "username" : "bob", "password" : "riviera", + "file" : open("filename", "rb") } + opener.open("http://wwww.bobsite.com/upload/", params) + +Further Example: + The main function of this file is a sample which downloads a page and + then uploads it to the W3C validator. + +%prep +%autosetup -n MultipartPostHandler-0.1.0 + +%build +%py3_build + +%install +%py3_install +install -d -m755 %{buildroot}/%{_pkgdocdir} +if [ -d doc ]; then cp -arf doc %{buildroot}/%{_pkgdocdir}; fi +if [ -d docs ]; then cp -arf docs %{buildroot}/%{_pkgdocdir}; fi +if [ -d example ]; then cp -arf example %{buildroot}/%{_pkgdocdir}; fi +if [ -d examples ]; then cp -arf examples %{buildroot}/%{_pkgdocdir}; fi +pushd %{buildroot} +if [ -d usr/lib ]; then + find usr/lib -type f -printf "/%h/%f\n" >> filelist.lst +fi +if [ -d usr/lib64 ]; then + find usr/lib64 -type f -printf "/%h/%f\n" >> filelist.lst +fi +if [ -d usr/bin ]; then + find usr/bin -type f -printf "/%h/%f\n" >> filelist.lst +fi +if [ -d usr/sbin ]; then + find usr/sbin -type f -printf "/%h/%f\n" >> filelist.lst +fi +touch doclist.lst +if [ -d usr/share/man ]; then + find usr/share/man -type f -printf "/%h/%f.gz\n" >> doclist.lst +fi +popd +mv %{buildroot}/filelist.lst . +mv %{buildroot}/doclist.lst . + +%files -n python3-MultipartPostHandler -f filelist.lst +%dir %{python3_sitelib}/* + +%files help -f doclist.lst +%{_docdir}/* + +%changelog +* Thu May 18 2023 Python_Bot <Python_Bot@openeuler.org> - 0.1.0-1 +- Package Spec generated @@ -0,0 +1 @@ +e3e51c1b3a72389c0b86ebc96b398365 MultipartPostHandler-0.1.0.tar.gz |