summaryrefslogtreecommitdiffstats
path: root/python/python-shortuuid.spec
blob: 8cab9fe20ba30a0088ce358eebb6d3001aebd516 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
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