Skip to content

Commit

Permalink
Use hatchling instead of setuptools (#174)
Browse files Browse the repository at this point in the history
* Use hatchling instead of setuptools
* Add __pycache__ to gitignore
  • Loading branch information
ThiefMaster authored Aug 16, 2024
1 parent 9e7789f commit e74739a
Show file tree
Hide file tree
Showing 61 changed files with 602 additions and 719 deletions.
52 changes: 0 additions & 52 deletions .github/utils/check_manifests.py

This file was deleted.

5 changes: 1 addition & 4 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,7 @@ jobs:
uses: actions/cache@v4
with:
path: ${{ steps.pip-cache.outputs.dir }}
key: pip|${{ runner.os }}|3.12|${{ hashFiles('**/setup.cfg') }}
key: pip|${{ runner.os }}|3.12|${{ hashFiles('**/pyproject.toml') }}

- uses: actions/cache@v4
id: cache-npm
Expand Down Expand Up @@ -126,9 +126,6 @@ jobs:
echo "VIRTUAL_ENV=$(pwd)/.venv" >> $GITHUB_ENV
echo "$(pwd)/.venv/bin" >> $GITHUB_PATH
- name: Check manifests
run: python .github/utils/check_manifests.py

- name: Check import sorting
if: success() || failure()
run: isort --diff --check-only .
Expand Down
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -21,3 +21,4 @@ node_modules/
*.lock
url_map.json
.venv/
__pycache__/
26 changes: 26 additions & 0 deletions access_override/pyproject.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
[project]
name = 'indico-plugin-access-override'
version = '3.3-dev'
license = 'MIT'
authors = [{ name = 'Indico Team', email = '[email protected]' }]
classifiers = [
'Environment :: Plugins',
'Environment :: Web Environment',
'License :: OSI Approved :: MIT License',
'Programming Language :: Python :: 3.12',
]
requires-python = '>=3.12.2, <3.13'
dependencies = ['indico>=3.3.dev0']

[project.urls]
GitHub = 'https://github.com/indico/indico-plugins-cern'

[project.entry-points.'indico.plugins']
access_override = 'indico_access_override:AccessOverridePlugin'

[build-system]
requires = ['hatchling==1.25.0']
build-backend = 'hatchling.build'

[tool.hatch.build]
only-include = ['indico_access_override.py']
28 changes: 0 additions & 28 deletions access_override/setup.cfg

This file was deleted.

11 changes: 0 additions & 11 deletions access_override/setup.py

This file was deleted.

5 changes: 0 additions & 5 deletions audiovisual/MANIFEST.in

This file was deleted.

41 changes: 41 additions & 0 deletions audiovisual/pyproject.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,41 @@
[project]
name = 'indico-plugin-audiovisual'
version = '3.3-dev'
license = 'MIT'
authors = [{ name = 'Indico Team', email = '[email protected]' }]
classifiers = [
'Environment :: Plugins',
'Environment :: Web Environment',
'License :: OSI Approved :: MIT License',
'Programming Language :: Python :: 3.12',
]
requires-python = '>=3.12.2, <3.13'
dependencies = ['indico>=3.3.dev0']

[project.urls]
GitHub = 'https://github.com/indico/indico-plugins-cern'

[project.entry-points.'indico.plugins']
audiovisual = 'indico_audiovisual.plugin:AVRequestsPlugin'

[build-system]
requires = ['hatchling==1.25.0']
build-backend = 'hatchling.build'

[tool.hatch.build]
packages = ['indico_audiovisual']
exclude = [
'*.no-header',
'.keep',
# exclude original client sources (they are all included in source maps anyway)
'indico_*/client/',
# no need for tests outside development
'test_snapshots/',
'tests/',
'*_test.py',
]
artifacts = [
'indico_*/translations/**/messages-react.json',
'indico_*/translations/**/*.mo',
'indico_*/static/dist/',
]
29 changes: 0 additions & 29 deletions audiovisual/setup.cfg

This file was deleted.

11 changes: 0 additions & 11 deletions audiovisual/setup.py

This file was deleted.

6 changes: 0 additions & 6 deletions burotel/MANIFEST.in

This file was deleted.

41 changes: 41 additions & 0 deletions burotel/pyproject.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,41 @@
[project]
name = 'indico-plugin-burotel'
version = '3.3-dev'
license = 'MIT'
authors = [{ name = 'Indico Team', email = '[email protected]' }]
classifiers = [
'Environment :: Plugins',
'Environment :: Web Environment',
'License :: OSI Approved :: MIT License',
'Programming Language :: Python :: 3.12',
]
requires-python = '>=3.12.2, <3.13'
dependencies = ['indico>=3.3.dev0', 'pyproj>=3.0.0.post1,<4']

[project.urls]
GitHub = 'https://github.com/indico/indico-plugins-cern'

[project.entry-points.'indico.plugins']
burotel = 'indico_burotel.plugin:BurotelPlugin'

[build-system]
requires = ['hatchling==1.25.0']
build-backend = 'hatchling.build'

[tool.hatch.build]
packages = ['indico_burotel']
exclude = [
'*.no-header',
'.keep',
# exclude original client sources (they are all included in source maps anyway)
'indico_*/client/',
# no need for tests outside development
'test_snapshots/',
'tests/',
'*_test.py',
]
artifacts = [
'indico_*/translations/**/messages-react.json',
'indico_*/translations/**/*.mo',
'indico_*/static/dist/',
]
30 changes: 0 additions & 30 deletions burotel/setup.cfg

This file was deleted.

11 changes: 0 additions & 11 deletions burotel/setup.py

This file was deleted.

5 changes: 0 additions & 5 deletions cern_access/MANIFEST.in

This file was deleted.

41 changes: 41 additions & 0 deletions cern_access/pyproject.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,41 @@
[project]
name = 'indico-plugin-cern_access'
version = '3.3-dev'
license = 'MIT'
authors = [{ name = 'Indico Team', email = '[email protected]' }]
classifiers = [
'Environment :: Plugins',
'Environment :: Web Environment',
'License :: OSI Approved :: MIT License',
'Programming Language :: Python :: 3.12',
]
requires-python = '>=3.12.2, <3.13'
dependencies = ['indico>=3.3.dev0']

[project.urls]
GitHub = 'https://github.com/indico/indico-plugins-cern'

[project.entry-points.'indico.plugins']
cern_access = 'indico_cern_access.plugin:CERNAccessPlugin'

[build-system]
requires = ['hatchling==1.25.0']
build-backend = 'hatchling.build'

[tool.hatch.build]
packages = ['indico_cern_access']
exclude = [
'*.no-header',
'.keep',
# exclude original client sources (they are all included in source maps anyway)
'indico_*/client/',
# no need for tests outside development
'test_snapshots/',
'tests/',
'*_test.py',
]
artifacts = [
'indico_*/translations/**/messages-react.json',
'indico_*/translations/**/*.mo',
'indico_*/static/dist/',
]
Loading

0 comments on commit e74739a

Please sign in to comment.