mirror of
https://github.com/Hopiu/django-select2.git
synced 2026-03-16 21:40:23 +00:00
Use setuptools_scm for versioning
This commit is contained in:
parent
ad42a01083
commit
0021f35b2a
3 changed files with 48 additions and 41 deletions
85
docs/conf.py
85
docs/conf.py
|
|
@ -1,39 +1,46 @@
|
|||
import os
|
||||
import sys
|
||||
|
||||
# This is needed since django_select2 requires django model modules
|
||||
# and those modules assume that django settings is configured and
|
||||
# have proper DB settings.
|
||||
# Using this we give a proper environment with working django settings.
|
||||
os.environ.setdefault("DJANGO_SETTINGS_MODULE", "tests.testapp.settings")
|
||||
|
||||
# If extensions (or modules to document with autodoc) are in another directory,
|
||||
# add these directories to sys.path here. If the directory is relative to the
|
||||
# documentation root, use os.path.abspath to make it absolute, like shown here.
|
||||
sys.path.insert(0, os.path.abspath('../tests.testapp'))
|
||||
sys.path.insert(0, os.path.abspath('..'))
|
||||
|
||||
extensions = [
|
||||
'sphinx.ext.autodoc',
|
||||
'sphinx.ext.napoleon',
|
||||
'sphinx.ext.inheritance_diagram',
|
||||
'sphinx.ext.intersphinx',
|
||||
'sphinx.ext.viewcode',
|
||||
'sphinx.ext.doctest',
|
||||
]
|
||||
|
||||
intersphinx_mapping = {
|
||||
'python': ('http://docs.python.org/3', None),
|
||||
'django': ('https://docs.djangoproject.com/en/stable/',
|
||||
'https://docs.djangoproject.com/en/stable/_objects/'),
|
||||
}
|
||||
|
||||
autodoc_default_flags = ['members', 'show-inheritance']
|
||||
autodoc_member_order = 'bysource'
|
||||
|
||||
inheritance_graph_attrs = dict(rankdir='TB')
|
||||
|
||||
inheritance_node_attrs = dict(shape='rect', fontsize=14, fillcolor='gray90',
|
||||
color='gray30', style='filled')
|
||||
|
||||
inheritance_edge_attrs = dict(penwidth=0.75)
|
||||
import os
|
||||
import sys
|
||||
|
||||
from pkg_resources import get_distribution
|
||||
|
||||
# This is needed since django_select2 requires django model modules
|
||||
# and those modules assume that django settings is configured and
|
||||
# have proper DB settings.
|
||||
# Using this we give a proper environment with working django settings.
|
||||
os.environ.setdefault("DJANGO_SETTINGS_MODULE", "tests.testapp.settings")
|
||||
|
||||
# If extensions (or modules to document with autodoc) are in another directory,
|
||||
# add these directories to sys.path here. If the directory is relative to the
|
||||
# documentation root, use os.path.abspath to make it absolute, like shown here.
|
||||
sys.path.insert(0, os.path.abspath('../tests.testapp'))
|
||||
sys.path.insert(0, os.path.abspath('..'))
|
||||
|
||||
|
||||
release = get_distribution('django_select2').version
|
||||
version = '.'.join(release.split('.')[:2])
|
||||
|
||||
|
||||
extensions = [
|
||||
'sphinx.ext.autodoc',
|
||||
'sphinx.ext.napoleon',
|
||||
'sphinx.ext.inheritance_diagram',
|
||||
'sphinx.ext.intersphinx',
|
||||
'sphinx.ext.viewcode',
|
||||
'sphinx.ext.doctest',
|
||||
]
|
||||
|
||||
intersphinx_mapping = {
|
||||
'python': ('http://docs.python.org/3', None),
|
||||
'django': ('https://docs.djangoproject.com/en/stable/',
|
||||
'https://docs.djangoproject.com/en/stable/_objects/'),
|
||||
}
|
||||
|
||||
autodoc_default_flags = ['members', 'show-inheritance']
|
||||
autodoc_member_order = 'bysource'
|
||||
|
||||
inheritance_graph_attrs = dict(rankdir='TB')
|
||||
|
||||
inheritance_node_attrs = dict(shape='rect', fontsize=14, fillcolor='gray90',
|
||||
color='gray30', style='filled')
|
||||
|
||||
inheritance_edge_attrs = dict(penwidth=0.75)
|
||||
|
|
|
|||
|
|
@ -24,7 +24,7 @@ install_requires =
|
|||
django>=2.0
|
||||
django-appconf>=0.6.0
|
||||
setup_requires =
|
||||
very-good-setuptools-git-version
|
||||
setuptools_scm
|
||||
sphinx
|
||||
pytest-runner
|
||||
tests_require =
|
||||
|
|
|
|||
2
setup.py
2
setup.py
|
|
@ -2,4 +2,4 @@
|
|||
|
||||
from setuptools import setup
|
||||
|
||||
setup(version_format='{tag}')
|
||||
setup(use_scm_version=True)
|
||||
|
|
|
|||
Loading…
Reference in a new issue