summaryrefslogtreecommitdiff
path: root/python-random-object-id.spec
diff options
context:
space:
mode:
Diffstat (limited to 'python-random-object-id.spec')
-rw-r--r--python-random-object-id.spec243
1 files changed, 243 insertions, 0 deletions
diff --git a/python-random-object-id.spec b/python-random-object-id.spec
new file mode 100644
index 0000000..b9f66f7
--- /dev/null
+++ b/python-random-object-id.spec
@@ -0,0 +1,243 @@
+%global _empty_manifest_terminate_build 0
+Name: python-random-object-id
+Version: 2.0.0
+Release: 1
+Summary: Generate a random MongoDB ObjectId.
+License: MIT
+URL: https://github.com/mxr/random-object-id
+Source0: https://mirrors.aliyun.com/pypi/web/packages/f9/0a/a82b6822abd80e0bef2972cf81077993e311af238f1ad3cf144316eb9a4b/random_object_id-2.0.0.tar.gz
+BuildArch: noarch
+
+
+%description
+# Random ObjectId
+
+[![Wheel Status](https://img.shields.io/pypi/wheel/random-object-id.svg?maxAge=2592000)](https://pypi.python.org/pypi/random-object-id/)
+
+## Motivation
+
+This is a toy project without any outlandish goals. Occasionally I
+needed a MongoDB ObjectID for a unit test. This saves a DB query,
+starting `mongo` locally, writing more than a line of Python, or
+visiting a website. I also wanted to learn more about writing &
+deploying Python packages.
+
+## Dependencies
+
+None
+
+## Supports
+
+py36+. See GitHub workflow [here][GitHub workflow].
+
+## Installation
+
+```console
+$ pip install random-object-id
+```
+
+## Usage
+
+```console
+$ random_object_id -h
+usage: random_object_id [-h] [-l]
+
+Generate a random MongoDB ObjectId
+
+optional arguments:
+ -h, --help show this help message and exit
+ -l, --longform prints the ID surrounded by ObjectId("...")
+```
+
+```python
+from random_object_id import generate
+
+generate() # => '5ecd3bbf875e60b4166f6699'
+```
+
+## Examples
+
+```console
+$ random_object_id
+55348611a56c10449ab80a4f
+$ random_object_id -l
+ObjectId("553486125ed592a10c4e8e6b")
+```
+
+[GitHub workflow]: https://github.com/mxr/random-object-id/blob/master/.github/workflows/main.yml
+
+
+
+
+%package -n python3-random-object-id
+Summary: Generate a random MongoDB ObjectId.
+Provides: python-random-object-id
+BuildRequires: python3-devel
+BuildRequires: python3-setuptools
+BuildRequires: python3-pip
+%description -n python3-random-object-id
+# Random ObjectId
+
+[![Wheel Status](https://img.shields.io/pypi/wheel/random-object-id.svg?maxAge=2592000)](https://pypi.python.org/pypi/random-object-id/)
+
+## Motivation
+
+This is a toy project without any outlandish goals. Occasionally I
+needed a MongoDB ObjectID for a unit test. This saves a DB query,
+starting `mongo` locally, writing more than a line of Python, or
+visiting a website. I also wanted to learn more about writing &
+deploying Python packages.
+
+## Dependencies
+
+None
+
+## Supports
+
+py36+. See GitHub workflow [here][GitHub workflow].
+
+## Installation
+
+```console
+$ pip install random-object-id
+```
+
+## Usage
+
+```console
+$ random_object_id -h
+usage: random_object_id [-h] [-l]
+
+Generate a random MongoDB ObjectId
+
+optional arguments:
+ -h, --help show this help message and exit
+ -l, --longform prints the ID surrounded by ObjectId("...")
+```
+
+```python
+from random_object_id import generate
+
+generate() # => '5ecd3bbf875e60b4166f6699'
+```
+
+## Examples
+
+```console
+$ random_object_id
+55348611a56c10449ab80a4f
+$ random_object_id -l
+ObjectId("553486125ed592a10c4e8e6b")
+```
+
+[GitHub workflow]: https://github.com/mxr/random-object-id/blob/master/.github/workflows/main.yml
+
+
+
+
+%package help
+Summary: Development documents and examples for random-object-id
+Provides: python3-random-object-id-doc
+%description help
+# Random ObjectId
+
+[![Wheel Status](https://img.shields.io/pypi/wheel/random-object-id.svg?maxAge=2592000)](https://pypi.python.org/pypi/random-object-id/)
+
+## Motivation
+
+This is a toy project without any outlandish goals. Occasionally I
+needed a MongoDB ObjectID for a unit test. This saves a DB query,
+starting `mongo` locally, writing more than a line of Python, or
+visiting a website. I also wanted to learn more about writing &
+deploying Python packages.
+
+## Dependencies
+
+None
+
+## Supports
+
+py36+. See GitHub workflow [here][GitHub workflow].
+
+## Installation
+
+```console
+$ pip install random-object-id
+```
+
+## Usage
+
+```console
+$ random_object_id -h
+usage: random_object_id [-h] [-l]
+
+Generate a random MongoDB ObjectId
+
+optional arguments:
+ -h, --help show this help message and exit
+ -l, --longform prints the ID surrounded by ObjectId("...")
+```
+
+```python
+from random_object_id import generate
+
+generate() # => '5ecd3bbf875e60b4166f6699'
+```
+
+## Examples
+
+```console
+$ random_object_id
+55348611a56c10449ab80a4f
+$ random_object_id -l
+ObjectId("553486125ed592a10c4e8e6b")
+```
+
+[GitHub workflow]: https://github.com/mxr/random-object-id/blob/master/.github/workflows/main.yml
+
+
+
+
+%prep
+%autosetup -n random_object_id-2.0.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-random-object-id -f filelist.lst
+%dir %{python3_sitelib}/*
+
+%files help -f doclist.lst
+%{_docdir}/*
+
+%changelog
+* Tue Jun 20 2023 Python_Bot <Python_Bot@openeuler.org> - 2.0.0-1
+- Package Spec generated