diff options
| author | Michel Alexandre Salim <salimma@fedoraproject.org> | 2021-12-08 17:19:52 -0800 |
|---|---|---|
| committer | Michel Alexandre Salim <salimma@fedoraproject.org> | 2021-12-08 17:19:52 -0800 |
| commit | 22620799491f3030e6d33d25e5ad992c0b3f9163 (patch) | |
| tree | a8eb91cc437b66f747e1df146f26a8878e1e2e69 /python | |
| parent | fa9a18f4bfc450dd74de28e619bede48a7e2d30d (diff) | |
| download | specs-22620799491f3030e6d33d25e5ad992c0b3f9163.tar.gz specs-22620799491f3030e6d33d25e5ad992c0b3f9163.tar.xz specs-22620799491f3030e6d33d25e5ad992c0b3f9163.zip | |
+ shortuuid
Signed-off-by: Michel Alexandre Salim <salimma@fedoraproject.org>
Diffstat (limited to 'python')
| -rw-r--r-- | python/python-shortuuid.spec | 67 |
1 files changed, 67 insertions, 0 deletions
diff --git a/python/python-shortuuid.spec b/python/python-shortuuid.spec new file mode 100644 index 0000000..8cab9fe --- /dev/null +++ b/python/python-shortuuid.spec @@ -0,0 +1,67 @@ +%global srcname shortuuid + +Name: python-%{srcname} +Version: 1.0.8 +Release: %autorelease +Summary: A generator library for concise, unambiguous and URL-safe UUIDs +License: BSD +URL: https://github.com/skorokithakis/shortuuid +Source0: %{pypi_source %{srcname}} + +BuildArch: noarch + +BuildRequires: python%{python3_pkgversion}-devel +BuildRequires: python%{python3_pkgversion}-setuptools +# Test dependencies: +BuildRequires: python3dist(django) +# shortuuid.django_fields generates UUIDs for Django +Enhances: python3dist(django) + +%global _description %{expand: +shortuuid is a simple python library that generates concise, unambiguous, +URL-safe UUIDs. + +Often, one needs to use non-sequential IDs in places where users will see them, +but the IDs must be as concise and easy to use as possible. shortuuid solves +this problem by generating uuids using Python's built-in uuid module and then +translating them to base57 using lowercase and uppercase letters and digits, and +removing similar-looking characters such as l, 1, I, O and 0.} + +%description %{_description} + + +%package -n python%{python3_pkgversion}-%{srcname} +Summary: %{summary} + +%description -n python%{python3_pkgversion}-%{srcname} %{_description} + + +%prep +%autosetup -p1 -n %{srcname}-%{version} + + +%generate_buildrequires +%pyproject_buildrequires -r + + +%build +%pyproject_wheel + + +%install +%pyproject_install +%pyproject_save_files %{srcname} + + +%check +%{__python3} setup.py test + + +%files -n python%{python3_pkgversion}-%{srcname} -f %{pyproject_files} +%license COPYING +%doc README.md +%{_bindir}/shortuuid + + +%changelog +%autochangelog |
