Skip to content

Commit

Permalink
Modernize project packaging
Browse files Browse the repository at this point in the history
  • Loading branch information
Ferdinand Hoffmann committed Jun 10, 2021
1 parent 64794dc commit 1a0a93d
Show file tree
Hide file tree
Showing 4 changed files with 56 additions and 38 deletions.
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@
.tox/
__pycache__
MANIFEST
build/
dist/

# local settings overrides
Expand Down
15 changes: 15 additions & 0 deletions pyproject.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
[build-system]
requires = [
"setuptools >= 40.9.0",
"wheel",
]
build-backend = "setuptools.build_meta"


[tool.isort]
line_length = 120
lines_after_imports = 2
known_first_party = ["questionnaire_core"]
known_django = ["django"]
sections = ["FUTURE", "STDLIB", "DJANGO", "THIRDPARTY", "FIRSTPARTY", "LOCALFOLDER"]
skip = ["migrations"]
47 changes: 38 additions & 9 deletions setup.cfg
Original file line number Diff line number Diff line change
@@ -1,15 +1,44 @@
[metadata]
license_file = LICENSE
name = django-questionnaire-core
version = 1.2.1-dev
author = anfema GmbH
author_email = contact@anfe.ma
description = A django application which can be used as a base for questionnaire functionality
long_description = file:README.md
long_description_content_type = text/markdown
license = MIT
license_files = LICENSE
url = https://github.com/anfema/django-questionnaire-core
classifiers =
Framework :: Django :: 2.2
Framework :: Django :: 3.1
Programming Language :: Python :: 3
Programming Language :: Python :: 3.6
Programming Language :: Python :: 3.7
Programming Language :: Python :: 3.8
Programming Language :: Python :: 3.9
License :: OSI Approved :: MIT License
Operating System :: OS Independent
test_suite = runtests.run_tests

[options]
python_requires = >=3.6
packages = find:
include_package_data = true
install_requires =
django>=2.2
django-ordered-model

[options.packages.find]
exclude =
example_app
example_app.*
tests
tests.*

[coverage:report]
fail_under = 100

[flake8]
exclude = locale,__pycache__,.pyc,templates,migrations
max-line-length = 119

[isort]
lines_after_imports = 2
known_first_party = questionnaire_core
known_third_party = django,ordered_model
skip=migrations
extend-exclude = migrations
max-line-length = 120
31 changes: 2 additions & 29 deletions setup.py
Original file line number Diff line number Diff line change
@@ -1,32 +1,5 @@
import os
# setuptools stub to allow editable installs
import setuptools

# allow setup.py to be run from any path
os.chdir(os.path.normpath(os.path.join(os.path.abspath(__file__), os.pardir)))

with open("README.md", "r") as fh:
long_description = fh.read()

setuptools.setup(
name="django-questionnaire-core",
version="1.2.1",
author="anfema GmbH",
author_email="contact@anfe.ma",
description="A django application which can be used as a base / starting point for questionnaire functionality in your project.",
long_description=long_description,
long_description_content_type="text/markdown",
url="https://github.com/anfema/django-questionnaire-core",
packages=setuptools.find_packages(),
classifiers=[
"Framework :: Django :: 1.11",
"Framework :: Django :: 2.0",
"Framework :: Django :: 2.1",
"Programming Language :: Python :: 3",
"Programming Language :: Python :: 3.6",
"Programming Language :: Python :: 3.7",
"License :: OSI Approved :: MIT License",
"Operating System :: OS Independent",
],
test_suite='runtests.run_tests',
zip_safe=False,
)
setuptools.setup()

0 comments on commit 1a0a93d

Please sign in to comment.