]>
Commit | Line | Data |
---|---|---|
8838c0a0 JB |
1 | # |
2 | # Conditional build: | |
3 | %bcond_with tests # unit tests (not included in sdist) | |
4 | ||
5 | Summary: Markdown URL utilities | |
6 | Summary(pl.UTF-8): Narzędzia do URL-i w formacie Markdown | |
7 | Name: python3-mdurl | |
8 | Version: 0.1.0 | |
b23b1d8c | 9 | Release: 3 |
8838c0a0 JB |
10 | License: MIT |
11 | Group: Libraries/Python | |
12 | #Source0Download: https://pypi.org/simple/mdurl/ | |
13 | Source0: https://files.pythonhosted.org/packages/source/m/mdurl/mdurl-%{version}.tar.gz | |
14 | # Source0-md5: 148af8104f656a6fd70877505bc3fa2c | |
15 | URL: https://pypi.org/project/mdurl/ | |
16 | BuildRequires: python3-modules >= 1:3.6 | |
17 | BuildRequires: python3-setuptools | |
18 | %if %{with tests} | |
19 | BuildRequires: python3-pytest | |
20 | BuildRequires: python3-pytest-randomly | |
21 | %endif | |
22 | BuildRequires: rpm-pythonprov | |
23 | BuildRequires: rpmbuild(macros) >= 1.714 | |
24 | Requires: python3-modules >= 1:3.6 | |
25 | BuildArch: noarch | |
26 | BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n) | |
27 | ||
28 | %description | |
29 | URL utilities for markdown-it parser. | |
30 | ||
31 | %description -l pl.UTF-8 | |
32 | Narzędzia do URL-i dla parsera markdown-it. | |
33 | ||
34 | %prep | |
35 | %setup -q -n mdurl-%{version} | |
36 | ||
37 | # setuptools stub | |
38 | cat >setup.py <<EOF | |
39 | from setuptools import setup | |
40 | setup() | |
41 | EOF | |
42 | ||
43 | # (extracted from pyproject.toml - keep in sync!) | |
44 | cat >setup.cfg <<'EOF' | |
45 | [metadata] | |
46 | name = mdurl | |
47 | version = %{version} | |
48 | description = Markdown URL utilities | |
49 | author = Taneli Hukkinen | |
50 | author_email = hukkin@users.noreply.github.com | |
51 | license = MIT | |
52 | license_file = LICENSE | |
53 | classifiers = | |
54 | License :: OSI Approved :: MIT License | |
55 | Operating System :: MacOS | |
56 | Operating System :: Microsoft :: Windows | |
57 | Operating System :: POSIX :: Linux | |
58 | Programming Language :: Python :: 3 :: Only | |
59 | Programming Language :: Python :: 3.6 | |
60 | Programming Language :: Python :: 3.7 | |
61 | Programming Language :: Python :: 3.8 | |
62 | Programming Language :: Python :: 3.9 | |
63 | Programming Language :: Python :: 3.10 | |
64 | Programming Language :: Python :: Implementation :: CPython | |
65 | Programming Language :: Python :: Implementation :: PyPy | |
66 | Topic :: Software Development :: Libraries :: Python Modules | |
67 | Typing :: Typed | |
68 | [options] | |
69 | packages = find: | |
70 | package_dir = | |
71 | =src | |
72 | python_requires = >=3.6 | |
73 | [options.packages.find] | |
74 | where=src | |
75 | EOF | |
76 | ||
77 | %build | |
78 | %py3_build | |
79 | ||
80 | %if %{with tests} | |
81 | PYTEST_DISABLE_PLUGIN_AUTOLOAD=1 \ | |
82 | PYTEST_PLUGINS="pytest_randomly" \ | |
83 | %{__python3} -m pytest tests | |
84 | %endif | |
85 | ||
86 | %install | |
87 | rm -rf $RPM_BUILD_ROOT | |
88 | ||
89 | %py3_install | |
90 | ||
91 | %clean | |
92 | rm -rf $RPM_BUILD_ROOT | |
93 | ||
94 | %files | |
95 | %defattr(644,root,root,755) | |
96 | %doc LICENSE README.md | |
97 | %{py3_sitescriptdir}/mdurl | |
98 | %{py3_sitescriptdir}/mdurl-%{version}-py*.egg-info |