# Note that this is https://pypi.org/project/python-ulid/; the canonical # project name ulid, https://pypi.org/project/ulid/, belongs to a different and # apparently defunct project. See # https://docs.fedoraproject.org/en-US/packaging-guidelines/Python/#_library_naming # and the issue filed upstream: # Possible confusion with the "ulid" package # https://github.com/mdomke/python-ulid/issues/13 Name: python-python-ulid Version: 2.2.0 Release: %autorelease Summary: Universally unique lexicographically sortable identifier # SPDX License: MIT URL: https://github.com/mdomke/python-ulid Source: %{pypi_source python_ulid} BuildArch: noarch BuildRequires: python3-devel # Test dependencies are defined in [envs.default] in hatch.toml. They have # tight version pins and include coverage tools; it is easier to maintain a # manual list. BuildRequires: %{py3_dist freezegun} BuildRequires: %{py3_dist pytest} %global common_description %{expand: A ULID is a universally unique lexicographically sortable identifier. It is * 128-bit compatible with UUID * 1.21e+24 unique ULIDs per millisecond * Lexicographically sortable! * Canonically encoded as a 26 character string, as opposed to the 36 character UUID * Uses Crockford's base32 for better efficiency and readability (5 bits per character) * Case insensitive * No special characters (URL safe) For more information have a look at the original specification, https://github.com/alizain/ulid#specification.} %description %{common_description} %package -n python3-python-ulid Summary: %{summary} # https://docs.fedoraproject.org/en-US/packaging-guidelines/Python/#_provides_for_importable_modules %py_provides python3-ulid %description -n python3-python-ulid %{common_description} %package -n python-ulid-tool Summary: Command-line tool to create or inspect ULIDs Requires: python3-python-ulid = %{version}-%{release} # Conflicts with a binary provided by golang-github-oklog-ulid # https://docs.fedoraproject.org/en-US/packaging-guidelines/Conflicts/#_binary_name_conflicts # Discussion opened with both upstreams in: # Multiple conflicting command-line tools called ulid exist # https://github.com/mdomke/python-ulid/issues/14 # Multiple conflicting command-line tools called ulid exist # https://github.com/oklog/ulid/issues/111 Conflicts: golang-github-oklog-ulid %description -n python-ulid-tool %{summary}. %prep %autosetup -n python_ulid-%{version} %generate_buildrequires %pyproject_buildrequires %build %pyproject_wheel %install %pyproject_install %pyproject_save_files -l ulid %check %pytest -v %files -n python3-python-ulid -f %{pyproject_files} %doc CHANGELOG.rst %doc README.rst %files -n python-ulid-tool %{_bindir}/ulid %changelog %autochangelog