summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorCoprDistGit <infra@openeuler.org>2023-06-20 07:52:55 +0000
committerCoprDistGit <infra@openeuler.org>2023-06-20 07:52:55 +0000
commit159914731406554621d10c82df92e3a424cf5ffe (patch)
tree0f3639a9efbcbcf109093364d0a37bfd9ee4def1
parentdb559e4645c454211aadd8e9c25b5ae192421aa4 (diff)
automatic import of python-rand-stringopeneuler20.03
-rw-r--r--.gitignore1
-rw-r--r--python-rand-string.spec216
-rw-r--r--sources1
3 files changed, 218 insertions, 0 deletions
diff --git a/.gitignore b/.gitignore
index e69de29..6068200 100644
--- a/.gitignore
+++ b/.gitignore
@@ -0,0 +1 @@
+/rand-string-0.50.tar.gz
diff --git a/python-rand-string.spec b/python-rand-string.spec
new file mode 100644
index 0000000..226d315
--- /dev/null
+++ b/python-rand-string.spec
@@ -0,0 +1,216 @@
+%global _empty_manifest_terminate_build 0
+Name: python-rand-string
+Version: 0.50
+Release: 1
+Summary: Generates a random string of a specified length.
+License: MIT
+URL: https://github.com/TheSongList/random-string
+Source0: https://mirrors.aliyun.com/pypi/web/packages/6a/ad/4daf29ad0206cc38d0b0d0c440dd3412424944b39e57ad93c9dd218ff368/rand-string-0.50.tar.gz
+BuildArch: noarch
+
+
+%description
+# rand-string
+Generates a random string of a specified length.
+
+# Usage
+Currently there are 5 types:
+- uppercase
+- lowercase
+- upperlower
+- alphanumerical
+- ascii
+
+You can probably guess what each one would create
+
+The function requires 2 parameters type and length; Type of course is the above.
+```py
+import rand_string.rand_string as rand
+rand.RandString(type, length)
+```
+Now lets look at some examples
+
+uppercase:
+```py
+print(rand.RandString("uppercase", 10))
+# Output: TPDROEAVRY
+```
+
+lowercase:
+```py
+print(rand.RandString("lowercase", 10))
+# Output: mdvsewzkwf
+```
+
+upperlower:
+```py
+print(rand.RandString("upperlower", 10))
+# Output: YjHFGzysFx
+```
+
+alphanumerical:
+```py
+print(rand.RandString("alphanumerical", 10))
+# Output: Fy0Nbqno6B
+```
+
+ascii:
+```py
+print(rand.RandString("ascii", 10))
+# Output: jtj-NV<PSV
+```
+
+%package -n python3-rand-string
+Summary: Generates a random string of a specified length.
+Provides: python-rand-string
+BuildRequires: python3-devel
+BuildRequires: python3-setuptools
+BuildRequires: python3-pip
+%description -n python3-rand-string
+# rand-string
+Generates a random string of a specified length.
+
+# Usage
+Currently there are 5 types:
+- uppercase
+- lowercase
+- upperlower
+- alphanumerical
+- ascii
+
+You can probably guess what each one would create
+
+The function requires 2 parameters type and length; Type of course is the above.
+```py
+import rand_string.rand_string as rand
+rand.RandString(type, length)
+```
+Now lets look at some examples
+
+uppercase:
+```py
+print(rand.RandString("uppercase", 10))
+# Output: TPDROEAVRY
+```
+
+lowercase:
+```py
+print(rand.RandString("lowercase", 10))
+# Output: mdvsewzkwf
+```
+
+upperlower:
+```py
+print(rand.RandString("upperlower", 10))
+# Output: YjHFGzysFx
+```
+
+alphanumerical:
+```py
+print(rand.RandString("alphanumerical", 10))
+# Output: Fy0Nbqno6B
+```
+
+ascii:
+```py
+print(rand.RandString("ascii", 10))
+# Output: jtj-NV<PSV
+```
+
+%package help
+Summary: Development documents and examples for rand-string
+Provides: python3-rand-string-doc
+%description help
+# rand-string
+Generates a random string of a specified length.
+
+# Usage
+Currently there are 5 types:
+- uppercase
+- lowercase
+- upperlower
+- alphanumerical
+- ascii
+
+You can probably guess what each one would create
+
+The function requires 2 parameters type and length; Type of course is the above.
+```py
+import rand_string.rand_string as rand
+rand.RandString(type, length)
+```
+Now lets look at some examples
+
+uppercase:
+```py
+print(rand.RandString("uppercase", 10))
+# Output: TPDROEAVRY
+```
+
+lowercase:
+```py
+print(rand.RandString("lowercase", 10))
+# Output: mdvsewzkwf
+```
+
+upperlower:
+```py
+print(rand.RandString("upperlower", 10))
+# Output: YjHFGzysFx
+```
+
+alphanumerical:
+```py
+print(rand.RandString("alphanumerical", 10))
+# Output: Fy0Nbqno6B
+```
+
+ascii:
+```py
+print(rand.RandString("ascii", 10))
+# Output: jtj-NV<PSV
+```
+
+%prep
+%autosetup -n rand-string-0.50
+
+%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-rand-string -f filelist.lst
+%dir %{python3_sitelib}/*
+
+%files help -f doclist.lst
+%{_docdir}/*
+
+%changelog
+* Tue Jun 20 2023 Python_Bot <Python_Bot@openeuler.org> - 0.50-1
+- Package Spec generated
diff --git a/sources b/sources
new file mode 100644
index 0000000..53c01fc
--- /dev/null
+++ b/sources
@@ -0,0 +1 @@
+de24e0df796d950dfe1199008e8b29ef rand-string-0.50.tar.gz