Skip to content

Commit fb55689

Browse files
committed
chore: Switch to setup.cfg
1 parent a753b28 commit fb55689

File tree

3 files changed

+45
-61
lines changed

3 files changed

+45
-61
lines changed

MANIFEST.in

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,9 +2,12 @@ include MANIFEST.in
22
include README.rst
33
include LICENSE
44
include AUTHORS
5+
include VERSION
56
recursive-include django_mongoengine *.html *.css *.js *.png *.gif *.woff *.ttf *.svg *.eot
67
recursive-include docs *
78
recursive-exclude docs *.pyc
89
recursive-exclude docs *.pyo
910
prune docs/_build
10-
prune docs/_themes/.git
11+
prune docs/_themes/.git
12+
prune tests/
13+
prune example/

setup.cfg

Lines changed: 36 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,37 @@
1-
[aliases]
2-
test = nosetests
1+
[metadata]
2+
name = django-mongoengine
3+
description = Django support for MongoDB via MongoEngine
4+
long_description = file:README.rst
5+
long_description_content_type = text/x-rst
6+
license = BSD
7+
author = Ross Lawley
8+
email_email = [email protected]
9+
version = file:VERSION
10+
url = https://github.com/mongoengine/django-mongoengine
11+
download_url = https://github.com/mongoengine/django-mongoengine/tarball/master
12+
classifiers =
13+
Development Status :: 4 - Beta
14+
Environment :: Web Environment
15+
Intended Audience :: Developers
16+
License :: OSI Approved :: BSD License
17+
Operating System :: OS Independent
18+
Programming Language :: Python
19+
Programming Language :: Python :: 3
20+
Topic :: Internet :: WWW/HTTP :: Dynamic Content
21+
Topic :: Software Development :: Libraries :: Python Modules
22+
Framework :: Django
323

4-
[nosetests]
5-
verbosity = 2
6-
detailed-errors = 1
7-
with-coverage = 0
8-
cover-erase = 1
9-
cover-html = 1
10-
cover-html-dir = ../htmlcov
11-
cover-package = django_mongoengine
12-
tests = tests
24+
[options]
25+
zip_safe = False
26+
install_requires =
27+
Django>3.1,<4.1
28+
mongoengine>=0.14
29+
include_package_data = True
30+
packages = find:
31+
32+
[options.packages.find]
33+
exclude =
34+
doc
35+
docs
36+
tests
37+
example

setup.py

Lines changed: 5 additions & 49 deletions
Original file line numberDiff line numberDiff line change
@@ -1,51 +1,7 @@
1-
import os
2-
import sys
3-
from pathlib import Path
1+
import pkg_resources
2+
from setuptools import setup
43

5-
from setuptools import find_packages, setup
4+
# (1) check required versions (from https://medium.com/@daveshawley/safely-using-setup-cfg-for-metadata-1babbe54c108)
5+
pkg_resources.require("setuptools>=39.2")
66

7-
_directory = Path(__file__).parent
8-
9-
__version__ = (_directory / "VERSION").read_text().strip()
10-
__description__ = 'Django support for MongoDB via MongoEngine'
11-
__license__ = 'BSD'
12-
__author__ = 'Ross Lawley'
13-
__email__ = '[email protected]'
14-
15-
16-
sys.path.insert(0, os.path.dirname(__file__))
17-
18-
19-
setup(
20-
name='django-mongoengine',
21-
version=__version__,
22-
url='https://github.com/mongoengine/django-mongoengine',
23-
download_url='https://github.com/mongoengine/django-mongoengine/tarball/master',
24-
license=__license__,
25-
author=__author__,
26-
author_email=__email__,
27-
description=__description__,
28-
long_description=(_directory / "README.rst").read_text().strip(),
29-
long_description_content_type="text/x-rst",
30-
zip_safe=False,
31-
platforms='any',
32-
install_requires=["Django>3.1,<4.1", "mongoengine>=0.14"],
33-
packages=find_packages(
34-
exclude=(
35-
'doc',
36-
'docs',
37-
)
38-
),
39-
include_package_data=True,
40-
classifiers=[
41-
'Development Status :: 4 - Beta',
42-
'Environment :: Web Environment',
43-
'Intended Audience :: Developers',
44-
'License :: OSI Approved :: BSD License',
45-
'Operating System :: OS Independent',
46-
'Programming Language :: Python',
47-
'Topic :: Internet :: WWW/HTTP :: Dynamic Content',
48-
'Topic :: Software Development :: Libraries :: Python Modules',
49-
'Framework :: Django',
50-
],
51-
)
7+
setup()

0 commit comments

Comments
 (0)