Skip to content

Commit

Permalink
Server: Transition to "pyproject.toml"
Browse files Browse the repository at this point in the history
  • Loading branch information
jcfr committed Apr 18, 2024
1 parent 3c2a2a3 commit fb8ee3e
Show file tree
Hide file tree
Showing 7 changed files with 95 additions and 1,888 deletions.
5 changes: 1 addition & 4 deletions .circleci/config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -29,12 +29,9 @@ jobs:
command: bash -c "mkdir /dev/shm/mongo && mongod --storageEngine ephemeralForTest --nojournal --dbpath=/dev/shm/mongo --noauth --bind_ip_all"
steps:
- checkout
- run:
name: Install pytest_girder
command: pip install pytest_girder
- run:
name: Install server plugin
command: pip install .
command: pip install .[test]
- run:
name: Install CLI
command: pip install -e .[test]
Expand Down
10 changes: 0 additions & 10 deletions MANIFEST.in

This file was deleted.

82 changes: 80 additions & 2 deletions pyproject.toml
Original file line number Diff line number Diff line change
@@ -1,3 +1,82 @@
[build-system]
requires = [
"setuptools>=42",
# Required to support dynmamic version
"girder==3.1.20",
"girder-hashsum-download==3.1.20",
'tomli; python_version<"3.11"',
"versioneer",
]
build-backend = "setuptools.build_meta"

[project]
name = "slicer-package-manager"
description = "Manage Slicer application and extension packages."
authors = [
{name = "Pierre Assemat", email = "[email protected]"},
{name = "Jean-Christophe Fillion-Robin", email = "[email protected]"},
]
maintainers = [
{name = "Jean-Christophe Fillion-Robin", email = "[email protected]"},
]
readme = "README.rst"
keywords = ["girder-plugin", "slicer_package_manager"]
classifiers = [
"Development Status :: 5 - Production/Stable",
"License :: OSI Approved :: Apache Software License",
"Natural Language :: English",
"Programming Language :: Python :: 3",
"Programming Language :: Python :: 3.7",
"Programming Language :: Python :: 3.8",
"Programming Language :: Python :: 3.9",
]
requires-python = ">=3.7"
dynamic = ["version"]
dependencies = [
"girder==3.1.20",
"girder-hashsum-download==3.1.20",
]

[project.entry-points."girder.plugin"]
slicer_package_manager = "slicer_package_manager:GirderPlugin"

[project.optional-dependencies]
test = [
"pytest~=7.4.0", # See https://github.com/TvoroG/pytest-lazy-fixture/issues/63
"pytest-girder==3.1.20",
"pytest-lazy-fixture",
"tox",
"virtualenv",
# lint
"ruff",
]

[project.urls]
Documentation = "https://slicer-package-manager.readthedocs.io"
Source = "https://github.com/girder/slicer_package_manager"

[tool.setuptools]
packages = [
"slicer_package_manager",
"slicer_package_manager.api",
"slicer_package_manager.models",
"tests",
]
py-modules = [
"slicer_package_manager._version",
]
zip-safe = false

[tool.setuptools.dynamic]
version = {attr = "slicer_package_manager.__version__"}

[tool.versioneer]
VCS = "git"
versionfile_source = "slicer_package_manager/_version.py"
versionfile_build = "slicer_package_manager/_version.py"
style = "pep440-post"
tag_prefix = ""

[tool.ruff]
select = [
"A", # flake8-builtins
Expand Down Expand Up @@ -27,7 +106,6 @@ select = [
"YTT", # flake8-2020
]
extend-exclude = [
"versioneer.py",
"*/_vendor/bson/*.py",
"slicer_package_manager/_version.py",
]
Expand Down Expand Up @@ -71,4 +149,4 @@ fixture-parentheses = false
ignore-variadic-names = true

[tool.ruff.per-file-ignores]
"python_client/slicer_package_manager_client/__init__.py" = ["A002"] # Argument `all` is shadowing a python builtin
"python_client/slicer_package_manager_client/__init__.py" = ["A002"] # Argument `all` is shadowing a python builtin
9 changes: 0 additions & 9 deletions setup.cfg

This file was deleted.

40 changes: 3 additions & 37 deletions setup.py
Original file line number Diff line number Diff line change
@@ -1,45 +1,11 @@
import versioneer

from setuptools import setup, find_packages
from setuptools import setup

with open('README.rst') as readme_file:
readme = readme_file.read()

requirements = [
'girder==3.1.20',
'girder-hashsum-download==3.1.20',
]
# This file is required to support editable install
# See https://setuptools.pypa.io/en/latest/userguide/pyproject_config.html

setup(
author='Jean-Christophe Fillion-Robin',
author_email='[email protected]',
classifiers=[
'Development Status :: 5 - Production/Stable',
'License :: OSI Approved :: Apache Software License',
'Natural Language :: English',
'Programming Language :: Python :: 3',
'Programming Language :: Python :: 3.6',
'Programming Language :: Python :: 3.7',
'Programming Language :: Python :: 3.8',
'Programming Language :: Python :: 3.9',
],
description='Manage Slicer application and extension packages.',
install_requires=requirements,
license='Apache Software License 2.0',
long_description=readme,
long_description_content_type='text/x-rst',
include_package_data=True,
keywords='girder-plugin, slicer_package_manager',
name='slicer_package_manager',
packages=find_packages(exclude=['test', 'test.*']),
python_requires='>=3.6',
url='https://github.com/girder/slicer_package_manager',
version=versioneer.get_version(),
cmdclass=versioneer.get_cmdclass(),
zip_safe=False,
entry_points={
'girder.plugin': [
'slicer_package_manager = slicer_package_manager:GirderPlugin',
],
},
)
15 changes: 11 additions & 4 deletions tox.ini
Original file line number Diff line number Diff line change
@@ -1,18 +1,25 @@
[tox]
min_version = 3.28
isolated_build = true
envlist =
lint,
test

[testenv]
basepython = python3

[testenv:test]
deps =
pytest~=7.4.0 # See https://github.com/TvoroG/pytest-lazy-fixture/issues/63
pytest-girder==3.1.20
pytest-lazy-fixture
commands =
pytest {posargs}

[testenv:lint]
skipsdist = true
skip_install = true
deps =
pre-commit
commands =
pre-commit run --all-files {posargs}

[testenv:release]
passenv =
TWINE_USERNAME
Expand Down
Loading

0 comments on commit fb8ee3e

Please sign in to comment.