From 90dbd54f1d6ebfdc48099788218b478e9f152923 Mon Sep 17 00:00:00 2001 From: Ginger Butcher Date: Thu, 8 Dec 2022 18:17:09 +0000 Subject: [PATCH 1/4] build: add package data --- pyproject.toml | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/pyproject.toml b/pyproject.toml index 1885755..2dcfc94 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -52,6 +52,10 @@ zip-safe = false [tool.setuptools.packages.find] exclude = ["tests", "docs"] +[tool.setuptools.package-data] +"ckanext.gbif" = ["package.json"] +"ckanext.gbif.theme" = ["**/*"] + [tool.commitizen] name = "cz_nhm" version = "2.1.1" From a72b819ede167865f423f7cbc20fbaa709323144 Mon Sep 17 00:00:00 2001 From: Alice Butcher Date: Mon, 12 Dec 2022 10:33:56 +0000 Subject: [PATCH 2/4] style: change quotes in setup.py to single quotes --- setup.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/setup.py b/setup.py index 0bccec8..b7b1930 100755 --- a/setup.py +++ b/setup.py @@ -6,5 +6,5 @@ import setuptools -if __name__ == "__main__": +if __name__ == '__main__': setuptools.setup() From 65d5c8dd623ac01999e332c12f21f210da3775d9 Mon Sep 17 00:00:00 2001 From: Ginger Butcher Date: Mon, 12 Dec 2022 10:43:20 +0000 Subject: [PATCH 3/4] build: remove local less installation --- ckanext/gbif/theme/assets/webassets.yml | 2 -- package.json | 18 ------------------ pyproject.toml | 8 +++----- 3 files changed, 3 insertions(+), 25 deletions(-) delete mode 100644 package.json diff --git a/ckanext/gbif/theme/assets/webassets.yml b/ckanext/gbif/theme/assets/webassets.yml index d476d2a..611e896 100755 --- a/ckanext/gbif/theme/assets/webassets.yml +++ b/ckanext/gbif/theme/assets/webassets.yml @@ -1,8 +1,6 @@ main-css: output: ckanext-gbif/%(version)s_gbif.css filters: less - config: - LESS_BIN: ../../../../../node_modules/less/bin/lessc contents: - less/gbif.less diff --git a/package.json b/package.json deleted file mode 100644 index 4012829..0000000 --- a/package.json +++ /dev/null @@ -1,18 +0,0 @@ -{ - "name": "ckanext-gbif", - "version": "2.1.1", - "description": "A CKAN extension that that connects with the GBIF API.", - "repository": { - "type": "git", - "url": "git+https://github.com/NaturalHistoryMuseum/ckanext-gbif.git" - }, - "author": "", - "license": "GPL-3.0-or-later", - "bugs": { - "url": "https://github.com/NaturalHistoryMuseum/ckanext-gbif/issues" - }, - "homepage": "https://github.com/NaturalHistoryMuseum/ckanext-gbif", - "dependencies": { - "less": "^4.1.3" - } -} diff --git a/pyproject.toml b/pyproject.toml index 2dcfc94..016f8f8 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -19,9 +19,9 @@ classifiers = [ "Programming Language :: Python :: 3.8" ] dependencies = [ - "ckantools>=0.3.0", "python-dateutil", - "requests" + "requests", + "ckantools>=0.3.0" ] [project.optional-dependencies] @@ -53,8 +53,7 @@ zip-safe = false exclude = ["tests", "docs"] [tool.setuptools.package-data] -"ckanext.gbif" = ["package.json"] -"ckanext.gbif.theme" = ["**/*"] +"ckanext.gbif.theme" = ["*", "**/*"] [tool.commitizen] name = "cz_nhm" @@ -63,7 +62,6 @@ tag_format = "v$version" update_changelog_on_bump = true changelog_incremental = true version_files = [ - "package.json", "pyproject.toml:version" ] From c2be61f8d4603e20f5b45350d18445ad28731b61 Mon Sep 17 00:00:00 2001 From: Alice Butcher Date: Mon, 12 Dec 2022 12:31:38 +0000 Subject: [PATCH 4/4] docs(readme): add instruction to install lessc globally --- README.md | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/README.md b/README.md index 2185e7f..1589988 100644 --- a/README.md +++ b/README.md @@ -64,6 +64,11 @@ Installing from a `pyproject.toml` in editable mode (i.e. `pip install -e`) requ ckan.plugins = ... gbif ``` +2. Install `lessc` globally: + ```shell + npm install -g "less@~4.1" + ``` + # Configuration