Skip to content

Commit

Permalink
Merge pull request #88 from jirikuncar/packaging
Browse files Browse the repository at this point in the history
global: packaging cleanup
  • Loading branch information
davebshow committed Oct 27, 2017
2 parents ef9b7b7 + a40c1a9 commit f466c51
Show file tree
Hide file tree
Showing 8 changed files with 102 additions and 71 deletions.
8 changes: 4 additions & 4 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,8 @@ dist: trusty

language: python
python:
- 3.5
- 3.6
- 3.5
- 3.6

services:
- docker
Expand All @@ -13,14 +13,14 @@ before_install:
- docker pull leifurhauks/gremlin-server-tinkergraph

install:
- pip install -r requirements.txt
- pip install -e .[all]
- docker run -d --name gst -p 8182:8182 leifurhauks/gremlin-server-tinkergraph

before_script:
- sleep 30

script:
- coverage run --source=goblin setup.py test
- python setup.py test

after_success:
- coveralls
5 changes: 5 additions & 0 deletions MANIFEST.in
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
include *.txt
include *.yml
include LICENSE NOTICE
prune tests
prune docs
5 changes: 5 additions & 0 deletions NOTICE
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
Goblin
Copyright 2017 - David M. Brown
Copyright 2017 - Swiss Data Science Center (SDSC)
A partnership between École Polytechnique Fédérale de Lausanne (EPFL) and
Eidgenössische Technische Hochschule Zürich (ETHZ).
15 changes: 11 additions & 4 deletions docs/conf.py
Original file line number Diff line number Diff line change
Expand Up @@ -67,10 +67,16 @@
# |version| and |release|, also used in various other places throughout the
# built documents.
#
# The short X.Y version.
version = '0.1.1'
# Get the version string. Cannot be done with import!
g = {}
with open(os.path.join(os.path.dirname(__file__), '..',
'goblin', 'version.py'),
'rt') as fp:
exec(fp.read(), g)
version = g['__version__']

# The full version, including alpha/beta/rc tags.
release = '0.1.1'
release = version

# The language for content autogenerated by Sphinx. Refer to documentation
# for a list of supported languages.
Expand Down Expand Up @@ -366,4 +372,5 @@
intersphinx_mapping = {
'https://docs.python.org/3/': None,
'aiohttp': ('http://aiohttp.readthedocs.org/en/stable/', None),
'aiogremlin': ('http://aiogremlin.readthedocs.io/en/latest/', None)}
'aiogremlin': ('http://aiogremlin.readthedocs.io/en/latest/', None),
}
8 changes: 8 additions & 0 deletions goblin/version.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
# -*- coding: utf-8 -*-
"""Version information for Goblin.
This file is imported by ``goblin.__init__``,
and parsed by ``setup.py``.
"""

__version__ = '2.1.0'
43 changes: 0 additions & 43 deletions requirements.txt

This file was deleted.

6 changes: 5 additions & 1 deletion setup.cfg
Original file line number Diff line number Diff line change
Expand Up @@ -2,4 +2,8 @@
test=pytest

[tool:pytest]
norecursedirs = '.*', 'build', 'dist', 'CVS', '_darcs', '{arch}', '*.egg' lib lib64
# addopts = --pep8 --doctest-glob="*.rst" --doctest-modules --cov=goblin --cov-report=term-missing
addopts = --cov=goblin --cov-report=term-missing
doctest_optionflags = ALLOW_UNICODE ALLOW_BYTES DONT_ACCEPT_TRUE_FOR_1 ELLIPSIS IGNORE_EXCEPTION_DETAIL
pep8ignore = docs/conf.py ALL
testpaths = docs goblin tests
83 changes: 64 additions & 19 deletions setup.py
Original file line number Diff line number Diff line change
@@ -1,26 +1,71 @@
from setuptools import setup
# -*- coding: utf-8 -*-
"""Python toolkit for Tinker Pop 3 Gremlin Server"""

import os

setup(
name="goblin",
version="2.1.0",
url="",
license="AGPL",
author="davebshow",
author_email="davebshow@gmail.com",
description="Python toolkit for TP3 Gremlin Server",
packages=["goblin", "goblin.driver"],
install_requires=[
"aiogremlin==3.2.6rc1",
"inflection==0.3.1",
from setuptools import find_packages, setup

tests_require = [
'check-manifest>=0.25',
'coverage>=4.0',
'isort>=4.2.2',
'pydocstyle>=1.0.0',
'pytest-asyncio>=0.8.0',
'pytest-cache>=1.0',
'pytest-cov>=2.5.1',
'pytest-pep8>=1.0.6',
'pytest>=3.2.1',
]

extras_require = {
'docs': [
'Sphinx>=1.6.3',
'alabaster>=0.7.10',
],
test_suite="tests",
setup_requires=['pytest-runner'],
tests_require=['pytest-asyncio', 'pytest'],
'tests': tests_require,
}

extras_require['all'] = []
for name, reqs in extras_require.items():
extras_require['all'].extend(reqs)

setup_requires = [
'pytest-runner>=2.6.2',
]

install_requires = [
'aiogremlin==3.2.6rc1',
'gremlinpython==3.2.6',
'inflection==0.3.1',
]

packages = find_packages()

# Get the version string. Cannot be done with import!
g = {}
with open(os.path.join('goblin', 'version.py'), 'rt') as fp:
exec(fp.read(), g)
version = g['__version__']


setup(
name='goblin',
version=version,
url='https://github.com/davebshow/goblin',
license='Apache License 2.0',
author='davebshow',
author_email='davebshow@gmail.com',
description=__doc__,
packages=packages,
install_requires=install_requires,
extras_require=extras_require,
test_suite='tests',
setup_requires=setup_requires,
tests_require=tests_require,
classifiers=[
'Development Status :: 4 - Beta',
'Intended Audience :: Developers',
'License :: OSI Approved :: Apache License, Version 2.0,
'Operating System :: OS Independent'
]
'License :: OSI Approved :: Apache License, Version 2.0',
'Operating System :: OS Independent',
],
)

0 comments on commit f466c51

Please sign in to comment.