diff options
Diffstat (limited to 'python/python-shortuuid.spec')
| -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 |
