move doc to docs as it is more consistent, use new features of edgy.project to generate setup.py with data files

This commit is contained in:
Romain Dorgueil
2016-12-26 11:44:46 +01:00
parent a6cc8ba6db
commit 31dbfd8a22
14 changed files with 46 additions and 49 deletions

2
.gitignore vendored
View File

@ -28,7 +28,7 @@
/coverage.xml
/develop-eggs/
/dist/
/doc/_build/
/docs/_build/
/downloads/
/eggs/
/examples/private

View File

@ -1,7 +1,7 @@
# This file has been auto-generated.
# All changes will be lost, see Projectfile.
#
# Updated at 2016-12-09 08:33:52.136641
# Updated at 2016-12-26 11:43:38.014112
PYTHON ?= $(shell which python)
PYTHON_BASENAME ?= $(shell basename $(PYTHON))
@ -14,10 +14,10 @@ PYTEST ?= $(VIRTUAL_ENV)/bin/pytest
PYTEST_OPTIONS ?= --capture=no --cov=bonobo --cov-report html
SPHINX_OPTS ?=
SPHINX_BUILD ?= $(VIRTUAL_ENV)/bin/sphinx-build
SPHINX_SOURCEDIR ?= doc
SPHINX_SOURCEDIR ?= docs
SPHINX_BUILDDIR ?= $(SPHINX_SOURCEDIR)/_build
.PHONY: clean doc install install-dev lint test
.PHONY: $(SPHINX_SOURCEDIR) clean install install-dev lint test
# Installs the local project dependencies.
install: $(VIRTUAL_ENV)
@ -48,5 +48,5 @@ lint: install-dev
test: install-dev
$(PYTEST) $(PYTEST_OPTIONS) tests
doc: install-dev
$(SPHINX_SOURCEDIR): install-dev
$(SPHINX_BUILD) -b html -D latex_paper_size=a4 $(SPHINX_OPTS) $(SPHINX_SOURCEDIR) $(SPHINX_BUILDDIR)/html

View File

@ -4,8 +4,8 @@ name = 'bonobo'
description = 'Bonobo'
license = 'Apache License, Version 2.0'
url = 'https://github.com/hartym/bonobo'
download_url = 'https://github.com/hartym/bonobo'
url = 'https://github.com/python-bonobo/bonobo'
download_url = 'https://github.com/python-bonobo/bonobo/tarball/{version}'
author = 'Romain Dorgueil'
author_email = 'romain@dorgueil.net'
@ -49,3 +49,8 @@ data_files = [
'bonobo/ext/jupyter/static/index.js.map',
]),
]
@listen('edgy.project.feature.make.on_generate', priority=10)
def on_make_generate_docker_targets(event):
event.makefile['SPHINX_SOURCEDIR'] = 'docs'

View File

@ -7,4 +7,9 @@ PY35 = (sys.version_info >= (3, 5))
assert PY35, 'Python 3.5+ is required to use Bonobo.'
__version__ = '0.0.0'
# Version infos
try:
with open('../version.txt') as f:
__version__ = f.read().strip()
except:
__version__ = 'dev'

View File

Before

Width:  |  Height:  |  Size: 8.3 KiB

After

Width:  |  Height:  |  Size: 8.3 KiB

View File

@ -8,7 +8,6 @@ sys.path.insert(0, os.path.abspath('..'))
sys.path.insert(0, os.path.abspath('_themes'))
import bonobo
from bonobo import __version__
# -- General configuration ------------------------------------------------
@ -37,11 +36,8 @@ author = 'Romain Dorgueil'
# The version info for the project you're documenting, acts as replacement for
# |version| and |release|, also used in various other places throughout the
# built documents.
#
# The short X.Y version.
version = __version__
# The full version, including alpha/beta/rc tags.
release = __version__
version = bonobo.__version__
release = bonobo.__version__
# The language for content autogenerated by Sphinx. Refer to documentation
# for a list of supported languages.

View File

@ -5,49 +5,40 @@ from setuptools import setup, find_packages
tolines = lambda c: list(filter(None, map(lambda s: s.strip(), c.split('\n'))))
def read(filename, flt=None):
with open(filename) as f:
content = f.read().strip()
return flt(content) if callable(flt) else content
try:
version = read('version.txt')
except:
version = 'dev'
setup(
name='bonobo',
description='Bonobo',
license='Apache License, Version 2.0',
install_requires=[
'psutil >=5.0,<5.1',
'blessings >=1.6,<1.7',
],
version=version,
long_description=read('README.rst'),
classifiers=read('classifiers.txt', tolines),
packages=find_packages(exclude=['ez_setup', 'example', 'test']),
include_package_data=True,
extras_require={
'dev': [
'coverage >=4.2,<4.3',
'mock >=2.0,<2.1',
'nose >=1.3,<1.4',
'pylint >=1.6,<1.7',
'pytest >=3,<4',
'pytest-cov >=2.4,<2.5',
'sphinx',
'sphinx_rtd_theme',
'yapf',
],
'jupyter': ['ipywidgets >=6.0.0.beta5']
},
data_files=[('share/jupyter/nbextensions/bonobo', [
'bonobo/ext/jupyter/static/extension.js',
'bonobo/ext/jupyter/static/index.js',
'bonobo/ext/jupyter/static/index.js.map',
]), ],
url='https://github.com/hartym/bonobo',
download_url='https://github.com/hartym/bonobo'.format(version=version), )
description = 'Bonobo',
install_requires = ['blessings >=1.6,<1.7', 'psutil >=5.0,<5.1'],
license = 'Apache License, Version 2.0',
name = 'bonobo',
version = version,
long_description = read('README.rst'),
classifiers = read('classifiers.txt', tolines),
packages = find_packages(exclude=['ez_setup', 'example', 'test']),
include_package_data = True,
data_files = [('share/jupyter/nbextensions/bonobo-jupyter',
['bonobo/ext/jupyter/static/extension.js',
'bonobo/ext/jupyter/static/index.js',
'bonobo/ext/jupyter/static/index.js.map'])],
extras_require = {'dev': ['coverage >=4.2,<4.3',
'mock >=2.0,<2.1',
'nose >=1.3,<1.4',
'pylint >=1.6,<1.7',
'pytest >=3,<4',
'pytest-cov >=2.4,<2.5',
'sphinx',
'sphinx_rtd_theme',
'yapf'],
'jupyter': ['jupyter >=1.0,<1.1', 'ipywidgets >=6.0.0.beta5']},
url = 'https://github.com/python-bonobo/bonobo',
download_url = 'https://github.com/python-bonobo/bonobo/tarball/{version}'.format(version=version),
)