Skip to content

Commit

Permalink
feat: move extension template to pyproject
Browse files Browse the repository at this point in the history
  • Loading branch information
smotornyuk committed Nov 19, 2024
1 parent 2e8b869 commit 98b28d7
Show file tree
Hide file tree
Showing 5 changed files with 63 additions and 61 deletions.
2 changes: 1 addition & 1 deletion MANIFEST.in
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
include README.rst
include LICENSE
include requirements.txt
recursive-include ckanext/toolbelt *.html *.json *.js *.less *.css *.mo *.yml *.yaml *.toml
recursive-include ckanext/toolbelt *.html *.json *.js *.less *.css *.mo *.yml *.yaml *.toml *.sh *.ini
recursive-include ckanext/toolbelt/migration *.ini *.py *.mako
recursive-include ckanext/toolbelt/cli/copier *
recursive-exclude * *.pyc
2 changes: 1 addition & 1 deletion ckanext/toolbelt/__init__.py
Original file line number Diff line number Diff line change
@@ -1 +1 @@
__version__ = "0.4.25.post1"
__version__ = "0.4.26"
12 changes: 6 additions & 6 deletions ckanext/toolbelt/cli/copier/extended/{{project}}/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@
# CKAN core supports this short syntax. But internally it's unfolds into
## remote-ckan = https://github.com/ckan/ckan tag ckan-2.10.4
# if you want to use CKAN fork or specific commit, use this full specification
ckan_tag = ckan-2.10.4
ckan_tag = ckan-2.11.0

# items from this list are installed by `make full-upgrade` and `make sync
# install`. If you specify remote, but did not added extension to this list, it
Expand Down Expand Up @@ -70,10 +70,10 @@ ext_list = \
# * TYPE: type of reference specified by the next part. One of: branch, commit, tag
#
# * REF: commit hash, branch name, tag name, depending on TYPE value. Prefer tags
remote-admin-panel = https://github.com/mutantsan/ckanext-admin-panel commit 999183a
remote-admin-panel = https://github.com/DataShades/ckanext-admin-panel commit 999183a
# dev is an alternative. You can install it via `make full-upgrade
# alternative=dev`. Any other prefix can be used instead of `dev`.
dev-admin-panel = https://github.com/mutantsan/ckanext-admin-panel branch master
dev-admin-panel = https://github.com/DataShades/ckanext-admin-panel branch master

remote-cloudstorage = https://github.com/DataShades/ckanext-cloudstorage.git tag v0.3.2
remote-collection = https://github.com/DataShades/ckanext-collection.git tag v0.2.0a0
Expand All @@ -86,19 +86,19 @@ remote-geoview = https://github.com/ckan/ckanext-geoview.git tag v0.1.0
remote-googleanalytics = https://github.com/ckan/ckanext-googleanalytics.git tag v2.4.0
remote-harvest = https://github.com/ckan/ckanext-harvest.git tag v1.5.6
remote-hierarchy = https://github.com/ckan/ckanext-hierarchy.git tag v1.2.1
remote-let-me-in = https://github.com/mutantsan/ckanext-let-me-in tag v1.0.1
remote-let-me-in = https://github.com/DataShades/ckanext-let-me-in tag v1.0.1
remote-officedocs = https://github.com/jqnatividad/ckanext-officedocs tag v1.1.0
remote-or-facet = https://github.com/DataShades/ckanext-or_facet tag v0.1.1
remote-pdfview = https://github.com/ckan/ckanext-pdfview.git tag 0.0.8
remote-pygments = https://github.com/mutantsan/ckanext-pygments commit f4287bb
remote-pygments = https://github.com/DataShades/ckanext-pygments commit f4287bb
remote-resource-indexer = https://github.com/DataShades/ckanext-resource_indexer.git tag v0.4.1
remote-saml = https://github.com/DataShades/ckanext-saml.git tag v0.3.3
remote-scheming = https://github.com/ckan/ckanext-scheming tag release-3.0.0
remote-search-tweaks = https://github.com/dataShades/ckanext-search-tweaks tag v0.6.1
remote-spatial = https://github.com/ckan/ckanext-spatial tag v2.1.1
remote-syndicate = https://github.com/DataShades/ckanext-syndicate tag v2.2.2
remote-toolbelt = https://github.com/DataShades/ckanext-toolbelt.git tag v0.4.24
remote-unfold = https://github.com/mutantsan/ckanext-unfold.git tag v1.0.2
remote-unfold = https://github.com/DataShades/ckanext-unfold.git tag v1.0.2
remote-vip-portal = https://github.com/DataShades/ckanext-vip-portal.git tag v0.2.5a1
remote-xloader = https://github.com/ckan/ckanext-xloader.git tag 1.0.1

Expand Down
55 changes: 55 additions & 0 deletions ckanext/toolbelt/cli/copier/extended/{{project}}/pyproject.toml
Original file line number Diff line number Diff line change
@@ -1,3 +1,58 @@
[build-system]
requires = [ "setuptools",]
build-backend = "setuptools.build_meta"

[project]
name = "{{ project }}"
version = "0.0.1"
description = "{{ description }}"
classifiers = [
"Development Status :: 4 - Beta",
"License :: OSI Approved :: GNU Affero General Public License v3 or later (AGPLv3+)",
"Programming Language :: Python :: 3.9",
"Programming Language :: Python :: 3.10",
"Programming Language :: Python :: 3.11",
"Programming Language :: Python :: 3.12",
"Programming Language :: Python :: 3.13",
"Programming Language :: Python :: 3.14",
]
keywords = [ "CKAN" ]
requires-python = ">= 3.9"
dependencies = [ "typing_extensions", "pyyaml",]
authors = [
{name = "{{ author }}", email = "{{ author_email }}"},
]
maintainers = [
{name = "DataShades", email = "datashades@linkdigital.com.au"},
]


[project.readme]
file = "README.md"
content-type = "text/markdown"

[project.license]
text = "AGPL"

[project.urls]
Homepage = "https://github.com/{{ github_user_name }}/{{ project }}"

[project.optional-dependencies]
[options.extras_require]
test = ["pytest-ckan", "pytest-benchmark", "pytest-pretty"]
docs = ["mkdocs", "mkdocs-material", "pymdown-extensions", "mkdocstrings[python]"]
dev = ["pytest-ckan", "pytest-benchmark", "pytest-pretty", "mkdocs", "mkdocs-material", "pymdown-extensions", "mkdocstrings[python]", "pre-commit"]

[project.entry-points."ckan.plugins"]
{{ project_shortname }} = "ckanext.{{ project_shortname }}.plugin:{{ plugin_class_name }}"

[project.entry-points."babel.extractors"]
ckan = "ckan.lib.extract:extract_ckan"

[tool.setuptools.packages]
find = {}


[tool.ruff]
target-version = "py38"

Expand Down
53 changes: 0 additions & 53 deletions ckanext/toolbelt/cli/copier/extended/{{project}}/setup.cfg
Original file line number Diff line number Diff line change
@@ -1,56 +1,3 @@
[metadata]
name = {{ project }}
version = 0.0.1
description = {{ description }}
long_description = file: README.md
long_description_content_type = text/markdown
url = https://github.com/{{ github_user_name }}/{{ project }}
author = {{ author }}
author_email = {{ author_email }}
license = AGPL
classifiers =
Development Status :: 4 - Beta
License :: OSI Approved :: GNU Affero General Public License v3 or later (AGPLv3+)
Programming Language :: Python :: 3.8
Programming Language :: Python :: 3.9
Programming Language :: Python :: 3.10
Programming Language :: Python :: 3.11
Programming Language :: Python :: 3.12
Programming Language :: Python :: 3.13
keywords = CKAN

[options]
python_requires = >= 3.8
packages = find:
namespace_packages = ckanext
include_package_data = True
install_requires =
typing_extensions

[options.entry_points]
ckan.plugins =
{{ project_shortname }} = ckanext.{{ project_shortname }}.plugin:{{ plugin_class_name }}

babel.extractors =
ckan = ckan.lib.extract:extract_ckan

[options.extras_require]
test =
pytest-ckan
pytest-benchmark
pytest-pretty

docs =
mkdocs
mkdocs-material
pymdown-extensions
mkdocstrings[python]

dev =
%(test)s
%(docs)s
pre-commit

[extract_messages]
keywords = translate isPlural
add_comments = TRANSLATORS:
Expand Down

0 comments on commit 98b28d7

Please sign in to comment.