Skip to content

Commit

Permalink
Update packaging, use pyproject.toml, setuptools_scm and setup.cfg
Browse files Browse the repository at this point in the history
  • Loading branch information
alexprengere committed Jul 1, 2022
1 parent b4ff256 commit 437398a
Show file tree
Hide file tree
Showing 6 changed files with 71 additions and 54 deletions.
9 changes: 6 additions & 3 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -4,9 +4,12 @@
*.log.*
.env*
*.pid
dist/
build/
*.egg-info
/build
/dist
/*.egg-info/
/*.eggs/
.sass-cache/
node_modules/
.tox
# Generated by setuptools_scm
graphdash/_version.py
3 changes: 2 additions & 1 deletion graphdash/__init__.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
# -*- coding: utf-8 -*-

from .routes import app, CONF
from ._version import __version__

__all__ = ['app', 'CONF']
__all__ = ['app', 'CONF', '__version__']
7 changes: 7 additions & 0 deletions pyproject.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
[build-system]
requires = ["setuptools>=42", "wheel", "setuptools_scm[toml]>=3.4"]
build-backend = "setuptools.build_meta"

[tool.setuptools_scm]
write_to = "graphdash/_version.py"
write_to_template = "__version__ = \"{version}\"\n"
42 changes: 42 additions & 0 deletions setup.cfg
Original file line number Diff line number Diff line change
@@ -0,0 +1,42 @@
[metadata]
name = GraphDash
description = A web-based dashboard built from graphs and their metadata
long_description = file: README.rst
long_description_content_type = text/x-rst
url = https://github.com/AmadeusITGroup/graphdash'
author = Alex Prengère
author_email = [email protected]
license_files = LICENSE
classifiers =
Development Status :: 5 - Production/Stable
Programming Language :: Python :: 3
Programming Language :: Python :: 3 :: Only
Programming Language :: Python :: Implementation :: CPython
Programming Language :: Python :: Implementation :: PyPy
[options]
zip_safe = False
packages = find:
install_requires =
PyYAML
Flask
Markdown
Pygments
stop-words
python_requires = >=3.6.1
setup_requires =
setuptools_scm
scripts =
GraphDashManage
[options.package_data]
graphdash =
templates/*.html
assets/css/*
assets/js/*
assets/img/*
[options.entry_points]
console_scripts =
tfl = tfl.__main__:main
GraphDash = graphdash.__main__:main
52 changes: 2 additions & 50 deletions setup.py
Original file line number Diff line number Diff line change
@@ -1,53 +1,5 @@
#!/usr/bin/env python
# -*- coding: utf-8 -*-

"""
Packaging
"""

from __future__ import with_statement
from setuptools import setup, find_packages

with open('README.rst') as f:
LONG_DESCRIPTION = f.read()

with open('LICENSE') as f:
LICENSE = f.read()

INSTALL_REQUIRES = [
'PyYAML',
'Flask',
'Markdown',
'Pygments',
'stop-words',
]
from setuptools import setup

setup(
name='GraphDash',
version='0.10.3',
author='Alex Prengere',
author_email='[email protected]',
url='https://github.com/AmadeusITGroup/graphdash',
description='A web-based dashboard built on graphs and their metadata.',
long_description=LONG_DESCRIPTION,
license=LICENSE,
packages=find_packages(),
package_data={
'graphdash': [
'templates/*.html',
'assets/css/*',
'assets/js/*',
'assets/img/*',
],
},
zip_safe=False,
install_requires=INSTALL_REQUIRES,
entry_points={
'console_scripts': [
'GraphDash=graphdash.__main__:main',
],
},
scripts=[
'GraphDashManage',
],
use_scm_version=True,
)
12 changes: 12 additions & 0 deletions tox.ini
Original file line number Diff line number Diff line change
Expand Up @@ -25,3 +25,15 @@ exclude =
__pycache__
max-line-length = 100
ignore = E203,E241,E402,W503

[testenv:packages]
allowlist_externals =
rm
basepython = python3
deps =
build
twine
commands =
rm -rf build *.egg-info
python -m build -s -w -o dist
twine check dist/*

0 comments on commit 437398a

Please sign in to comment.