feat: switch from setup.cfg to pyproject.toml + hatchling
This commit is contained in:
parent
21d448340f
commit
8b2320ebc1
3
.gitignore
vendored
3
.gitignore
vendored
|
@ -1,5 +1,8 @@
|
||||||
|
*~
|
||||||
|
*.pyc
|
||||||
tailbone_theo.egg-info/
|
tailbone_theo.egg-info/
|
||||||
dev/settings.ini
|
dev/settings.ini
|
||||||
|
dist/
|
||||||
docs/_build/
|
docs/_build/
|
||||||
machines/theo-server/.vagrant/
|
machines/theo-server/.vagrant/
|
||||||
machines/theo-server/fabenv.py
|
machines/theo-server/fabenv.py
|
||||||
|
|
83
pyproject.toml
Normal file
83
pyproject.toml
Normal file
|
@ -0,0 +1,83 @@
|
||||||
|
|
||||||
|
[build-system]
|
||||||
|
requires = ["hatchling"]
|
||||||
|
build-backend = "hatchling.build"
|
||||||
|
|
||||||
|
|
||||||
|
[project]
|
||||||
|
name = "tailbone-theo"
|
||||||
|
version = "0.1.6"
|
||||||
|
description = "Theo, the order system"
|
||||||
|
readme = "README.rst"
|
||||||
|
authors = [{name = "Lance Edgar", email = "lance@edbob.org"}]
|
||||||
|
classifiers = [
|
||||||
|
"Development Status :: 3 - Alpha",
|
||||||
|
"Environment :: Console",
|
||||||
|
"Environment :: Web Environment",
|
||||||
|
"Framework :: Pyramid",
|
||||||
|
"Intended Audience :: Developers",
|
||||||
|
"Natural Language :: English",
|
||||||
|
"Operating System :: POSIX :: Linux",
|
||||||
|
"Programming Language :: Python",
|
||||||
|
"Programming Language :: Python :: 3",
|
||||||
|
"Topic :: Office/Business",
|
||||||
|
]
|
||||||
|
dependencies = [
|
||||||
|
"mysql-connector-python",
|
||||||
|
"psycopg2",
|
||||||
|
"Tailbone",
|
||||||
|
"typer",
|
||||||
|
]
|
||||||
|
|
||||||
|
|
||||||
|
[project.optional-dependencies]
|
||||||
|
catapult = ["onager", "rattail-onager", "tailbone-onager"]
|
||||||
|
corepos = ["pyCOREPOS", "rattail-corepos", "tailbone-corepos"]
|
||||||
|
fabric = ["rattail-fabric2"]
|
||||||
|
locsms = ["luckysmores", "rattail-luckysmores", "tailbone-locsms"]
|
||||||
|
|
||||||
|
|
||||||
|
[project.scripts]
|
||||||
|
theo = "theo.commands:theo_typer"
|
||||||
|
|
||||||
|
|
||||||
|
[project.entry-points."paste.app_factory"]
|
||||||
|
main = "theo.web.app:main"
|
||||||
|
webapi = "theo.web.webapi:main"
|
||||||
|
|
||||||
|
|
||||||
|
[project.entry-points."rattail.config.extensions"]
|
||||||
|
theo = "theo.config:TheoConfig"
|
||||||
|
|
||||||
|
|
||||||
|
[project.entry-points."rattail.importing"]
|
||||||
|
# nb. we always register all 3 handlers here, for version
|
||||||
|
# imports. any which fail to load will simply not appear
|
||||||
|
# available to the user.
|
||||||
|
"to_rattail_versions.from_rattail.import.theo_catapult" = "theo.importing.versions_catapult:FromTheoToTheoVersions"
|
||||||
|
"to_rattail_versions.from_rattail.import.theo_corepos" = "theo.importing.versions_corepos:FromTheoToTheoVersions"
|
||||||
|
"to_rattail_versions.from_rattail.import.theo_locsms" = "theo.importing.versions_locsms:FromTheoToTheoVersions"
|
||||||
|
|
||||||
|
|
||||||
|
[project.urls]
|
||||||
|
Homepage = "https://redmine.rattailproject.org/projects/theo"
|
||||||
|
Repository = "https://kallithea.rattailproject.org/rattail-project/theo"
|
||||||
|
Issues = "https://redmine.rattailproject.org/projects/theo/issues"
|
||||||
|
Changelog = "https://kallithea.rattailproject.org/rattail-project/theo/files/master/CHANGELOG.md"
|
||||||
|
|
||||||
|
|
||||||
|
[tool.commitizen]
|
||||||
|
version_provider = "pep621"
|
||||||
|
tag_format = "v$version"
|
||||||
|
update_changelog_on_bump = true
|
||||||
|
|
||||||
|
|
||||||
|
[tool.hatch.build.targets.sdist]
|
||||||
|
exclude = [
|
||||||
|
"machines/",
|
||||||
|
"mobile/",
|
||||||
|
]
|
||||||
|
|
||||||
|
|
||||||
|
[tool.hatch.build.targets.wheel]
|
||||||
|
packages = ["theo"]
|
60
setup.cfg
60
setup.cfg
|
@ -1,60 +0,0 @@
|
||||||
# -*- coding: utf-8; -*-
|
|
||||||
|
|
||||||
[metadata]
|
|
||||||
name = tailbone-theo
|
|
||||||
version = attr: theo.__version__
|
|
||||||
author = Lance Edgar
|
|
||||||
author_email = lance@edbob.org
|
|
||||||
url = https://rattailproject.org
|
|
||||||
description = Theo, the order system
|
|
||||||
long_description = file: README.rst
|
|
||||||
classifiers =
|
|
||||||
Development Status :: 3 - Alpha
|
|
||||||
Environment :: Console
|
|
||||||
Environment :: Web Environment
|
|
||||||
Framework :: Pyramid
|
|
||||||
Intended Audience :: Developers
|
|
||||||
Natural Language :: English
|
|
||||||
Operating System :: POSIX :: Linux
|
|
||||||
Programming Language :: Python
|
|
||||||
Programming Language :: Python :: 3
|
|
||||||
Topic :: Office/Business
|
|
||||||
|
|
||||||
|
|
||||||
[options]
|
|
||||||
install_requires =
|
|
||||||
mysql-connector-python
|
|
||||||
psycopg2
|
|
||||||
Tailbone
|
|
||||||
typer
|
|
||||||
|
|
||||||
packages = find:
|
|
||||||
include_package_data = True
|
|
||||||
|
|
||||||
|
|
||||||
[options.extras_require]
|
|
||||||
catapult = onager; rattail-onager; tailbone-onager
|
|
||||||
corepos = pyCOREPOS; rattail-corepos; tailbone-corepos
|
|
||||||
fabric = rattail-fabric2
|
|
||||||
locsms = luckysmores; rattail-luckysmores; tailbone-locsms
|
|
||||||
|
|
||||||
|
|
||||||
[options.entry_points]
|
|
||||||
|
|
||||||
console_scripts =
|
|
||||||
theo = theo.commands:theo_typer
|
|
||||||
|
|
||||||
rattail.config.extensions =
|
|
||||||
theo = theo.config:TheoConfig
|
|
||||||
|
|
||||||
rattail.importing =
|
|
||||||
# nb. we always register all 3 handlers here, for version
|
|
||||||
# imports. any which fail to load will simply not appear
|
|
||||||
# available to the user.
|
|
||||||
to_rattail_versions.from_rattail.import.theo_catapult = theo.importing.versions_catapult:FromTheoToTheoVersions
|
|
||||||
to_rattail_versions.from_rattail.import.theo_corepos = theo.importing.versions_corepos:FromTheoToTheoVersions
|
|
||||||
to_rattail_versions.from_rattail.import.theo_locsms = theo.importing.versions_locsms:FromTheoToTheoVersions
|
|
||||||
|
|
||||||
paste.app_factory =
|
|
||||||
main = theo.web.app:main
|
|
||||||
webapi = theo.web.webapi:main
|
|
29
setup.py
29
setup.py
|
@ -1,29 +0,0 @@
|
||||||
# -*- coding: utf-8; -*-
|
|
||||||
################################################################################
|
|
||||||
#
|
|
||||||
# Rattail -- Retail Software Framework
|
|
||||||
# Copyright © 2010-2023 Lance Edgar
|
|
||||||
#
|
|
||||||
# This file is part of Rattail.
|
|
||||||
#
|
|
||||||
# Rattail is free software: you can redistribute it and/or modify it under the
|
|
||||||
# terms of the GNU General Public License as published by the Free Software
|
|
||||||
# Foundation, either version 3 of the License, or (at your option) any later
|
|
||||||
# version.
|
|
||||||
#
|
|
||||||
# Rattail is distributed in the hope that it will be useful, but WITHOUT ANY
|
|
||||||
# WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
|
|
||||||
# FOR A PARTICULAR PURPOSE. See the GNU General Public License for more
|
|
||||||
# details.
|
|
||||||
#
|
|
||||||
# You should have received a copy of the GNU General Public License along with
|
|
||||||
# Rattail. If not, see <http://www.gnu.org/licenses/>.
|
|
||||||
#
|
|
||||||
################################################################################
|
|
||||||
"""
|
|
||||||
Theo setup script
|
|
||||||
"""
|
|
||||||
|
|
||||||
from setuptools import setup
|
|
||||||
|
|
||||||
setup()
|
|
18
tasks.py
18
tasks.py
|
@ -2,7 +2,7 @@
|
||||||
################################################################################
|
################################################################################
|
||||||
#
|
#
|
||||||
# Rattail -- Retail Software Framework
|
# Rattail -- Retail Software Framework
|
||||||
# Copyright © 2010-2020 Lance Edgar
|
# Copyright © 2010-2024 Lance Edgar
|
||||||
#
|
#
|
||||||
# This file is part of Rattail.
|
# This file is part of Rattail.
|
||||||
#
|
#
|
||||||
|
@ -30,16 +30,14 @@ import shutil
|
||||||
from invoke import task
|
from invoke import task
|
||||||
|
|
||||||
|
|
||||||
here = os.path.abspath(os.path.dirname(__file__))
|
|
||||||
exec(open(os.path.join(here, 'theo', '_version.py')).read())
|
|
||||||
|
|
||||||
|
|
||||||
@task
|
@task
|
||||||
def release(ctx):
|
def release(c):
|
||||||
"""
|
"""
|
||||||
Release a new version of 'tailbone-theo'
|
Release a new version of 'tailbone-theo'
|
||||||
"""
|
"""
|
||||||
shutil.rmtree('tailbone_theo.egg-info')
|
if os.path.exists('dist'):
|
||||||
ctx.run('python setup.py sdist --formats=gztar')
|
shutil.rmtree('dist')
|
||||||
filename = 'tailbone-theo-{}.tar.gz'.format(__version__)
|
if os.path.exists('tailbone_theo.egg-info'):
|
||||||
ctx.run('twine upload dist/{}'.format(filename))
|
shutil.rmtree('tailbone_theo.egg-info')
|
||||||
|
c.run('python -m build --sdist')
|
||||||
|
c.run('twine upload dist/*')
|
||||||
|
|
|
@ -1,3 +1,6 @@
|
||||||
# -*- coding: utf-8; -*-
|
# -*- coding: utf-8; -*-
|
||||||
|
|
||||||
__version__ = '0.1.6'
|
from importlib.metadata import version
|
||||||
|
|
||||||
|
|
||||||
|
__version__ = version('tailbone-theo')
|
||||||
|
|
Loading…
Reference in a new issue