|
1 | 1 | #!/usr/bin/python3 |
2 | 2 |
|
3 | | -# This file is managed by `repo_helper`. Don't edit it directly. |
| 3 | +# This file is managed by 'repo_helper'. Don't edit it directly. |
| 4 | + |
| 5 | +# stdlib |
| 6 | +import pathlib |
4 | 7 |
|
5 | 8 | # this package |
6 | | -from __pkginfo__ import * # pylint: disable=wildcard-import |
| 9 | +from __pkginfo__ import __version__ |
| 10 | + |
| 11 | +description_block = """Helpful functions for Python 🐍 🛠️ |
| 12 | +
|
| 13 | +
|
| 14 | +
|
| 15 | +Before installing please ensure you have added the following channels: domdfcoding, conda-forge |
| 16 | +""".replace('"', '\\"') |
7 | 17 |
|
| 18 | + |
| 19 | +repo_root = pathlib.Path(__file__).parent |
8 | 20 | recipe_dir = repo_root / "conda" |
9 | 21 |
|
10 | 22 | if not recipe_dir.exists(): |
11 | 23 | recipe_dir.mkdir() |
12 | 24 |
|
13 | | -# TODO: entry_points, manifest |
| 25 | +all_requirements = (repo_root / "requirements.txt").read_text(encoding="utf-8").split('\n') |
14 | 26 |
|
15 | | -all_requirements = install_requires[:] |
| 27 | +# TODO: entry_points, manifest |
16 | 28 |
|
17 | | -if isinstance(extras_require, dict): |
18 | | - for requires in extras_require.values(): |
19 | | - all_requirements += requires |
| 29 | +for requires in {'dates': ['pytz>=2019.1'], 'testing': ['pytest>=6.0.0'], 'all': ['pytest>=6.0.0', 'pytz>=2019.1']}.values(): |
| 30 | + all_requirements += requires |
20 | 31 |
|
21 | 32 | all_requirements = {x.replace(" ", '') for x in set(all_requirements)} |
22 | 33 | requirements_block = "\n".join(f" - {req}" for req in all_requirements if req) |
23 | 34 |
|
24 | | -description_block = conda_description.replace('"', '\\"') |
25 | | - |
26 | 35 | (recipe_dir / "meta.yaml").write_text( |
27 | 36 | encoding="UTF-8", |
28 | 37 | data=f"""\ |
29 | 38 | package: |
30 | | - name: "{pypi_name.lower()}" |
| 39 | + name: "domdf_python_tools" |
31 | 40 | version: "{__version__}" |
32 | 41 |
|
33 | 42 | source: |
34 | | - url: "https://pypi.io/packages/source/{pypi_name[0]}/{pypi_name}/{pypi_name}-{__version__}.tar.gz" |
| 43 | + url: "https://pypi.io/packages/source/d/domdf_python_tools/domdf_python_tools-{__version__}.tar.gz" |
35 | 44 |
|
36 | 45 | build: |
37 | | -# entry_points: |
38 | | -# - {import_name} = {import_name}:main |
39 | | -# skip_compile_pyc: |
40 | | -# - "*/templates/*.py" # These should not (and cannot) be compiled |
41 | 46 | noarch: python |
42 | 47 | script: "{{{{ PYTHON }}}} -m pip install . -vv" |
43 | 48 |
|
|
56 | 61 |
|
57 | 62 | test: |
58 | 63 | imports: |
59 | | - - {import_name} |
| 64 | + - domdf_python_tools |
60 | 65 |
|
61 | 66 | about: |
62 | | - home: "{web}" |
63 | | - license: "{__license__}" |
| 67 | + home: "https://github.com/domdfcoding/domdf_python_tools" |
| 68 | + license: "GNU Lesser General Public License v3 or later (LGPLv3+)" |
64 | 69 | # license_family: LGPL |
65 | 70 | # license_file: LICENSE |
66 | | - summary: "{short_desc}" |
| 71 | + summary: "Helpful functions for Python 🐍 🛠️" |
67 | 72 | description: "{description_block}" |
68 | | - doc_url: {project_urls["Documentation"]} |
69 | | - dev_url: {project_urls["Source Code"]} |
| 73 | + doc_url: https://domdf_python_tools.readthedocs.io |
| 74 | + dev_url: https://github.com/domdfcoding/domdf_python_tools |
70 | 75 |
|
71 | 76 | extra: |
72 | 77 | maintainers: |
73 | | - - {author} |
74 | | - - github.com/{github_username} |
| 78 | + - Dominic Davis-Foster |
| 79 | + - github.com/domdfcoding |
75 | 80 |
|
76 | 81 | """) |
77 | 82 |
|
|
0 commit comments