bigchaindb/setup.py

150 lines
4.2 KiB
Python
Raw Normal View History

# Copyright © 2020 Interplanetary Database Association e.V.,
# BigchainDB and IPDB software contributors.
# SPDX-License-Identifier: (Apache-2.0 AND CC-BY-4.0)
# Code is Apache-2.0 and docs are CC-BY-4.0
2016-02-09 21:50:55 +01:00
"""
BigchainDB: The Blockchain Database
2016-02-09 21:50:55 +01:00
2017-01-17 14:21:54 +01:00
For full docs visit https://docs.bigchaindb.com
2016-02-09 21:50:55 +01:00
"""
2016-03-17 17:03:08 +01:00
from setuptools import setup, find_packages
import sys
2016-02-09 21:50:55 +01:00
if sys.version_info < (3, 6):
sys.exit('Please use Python version 3.6 or higher.')
# get the version
version = {}
with open('bigchaindb/version.py') as fp:
exec(fp.read(), version)
# check if setuptools is up to date
def check_setuptools_features():
import pkg_resources
try:
list(pkg_resources.parse_requirements('foo~=1.0'))
except ValueError:
exit('Your Python distribution comes with an incompatible version '
'of `setuptools`. Please run:\n'
2016-05-19 11:30:58 +02:00
' $ pip3 install --upgrade setuptools\n'
'and then run this command again')
check_setuptools_features()
dev_require = [
'ipdb',
'ipython',
2016-12-13 11:55:50 +01:00
'watchdog',
2017-03-13 17:55:11 +01:00
'logging_tree',
2017-11-20 15:25:49 +01:00
'pre-commit'
]
2016-02-17 15:47:47 +01:00
docs_require = [
'Sphinx~=1.0',
'recommonmark>=0.4.0',
2016-03-02 01:12:42 +01:00
'sphinx-rtd-theme>=0.1.9',
'sphinxcontrib-httpdomain>=1.5.0',
'sphinxcontrib-napoleon>=0.4.4',
'aafigure>=0.6',
'wget'
2016-02-17 15:47:47 +01:00
]
tests_require = [
'coverage',
'pep8',
'flake8',
'flake8-quotes==0.8.1',
'hypothesis>=5.3.0',
# Removed pylint because its GPL license isn't Apache2-compatible
2016-12-08 11:42:46 +01:00
'pytest>=3.0.0',
'pytest-cov>=2.2.1',
'pytest-mock',
'pytest-xdist',
'pytest-flask',
2017-03-30 17:27:03 +02:00
'pytest-aiohttp',
'pytest-asyncio',
2016-12-07 18:42:26 +01:00
'tox',
] + docs_require
2016-10-18 03:46:21 +02:00
install_requires = [
# TODO Consider not installing the db drivers, or putting them in extras.
'pymongo~=3.6',
'cryptoconditions==0.8.0',
'python-rapidjson~=0.6.0',
'logstats~=0.2.1',
'flask==1.0.0',
'flask-cors~=3.0.0',
2016-10-18 03:46:21 +02:00
'flask-restful~=0.3.0',
'requests~=2.20.0',
2016-10-18 03:46:21 +02:00
'gunicorn~=19.0',
Schema definition (#798) Commit messages for posterity: * wip transaction schema definition * test for SchemaObject * test SchemaObject definions meta property * schema documentation updates * test for basic validation * commit before change to .json file definiton + rst generation * move to straight .json schema, test for additionalProperties on each object * add asset to transaction definiton * remove outdated tx validation * make all tests pass * create own exception for validation error and start validating transactions * more tx validation fixes * move to yaml file for schema * automatic schema documentation generator * remove redundant section * use YAML safe loading * change current_owners to owners_before in tx schema * re-run tests and make correct yaml schema * fix some broken tests * update Release_Process.md * move tx validation into it's own method * add jsonschema dependency * perform schema validation after ID validation on Transaction * Release_Process.md, markdown auto numbering * remove old transaction.json * resolve remaining TODOs in schema docuementation * add `id` and `$schema` to transaction.yaml * add transaction.yaml to setup.py so it gets copied * address some concernes in PR for transaction.yaml * address more PR concerns in transaction.yaml * refactor validtion exceptions and move transaction schema validation into it's own function in bigchaindb.common.schema.__init__ * add note to generated schema.rst indicating when and how it's generated * move tx schema validation back above ID validation in Transaction.validate_structure, test that structurally invalid transaction gets caught and 400 returned in TX POST handler * remove timestamp from transaction schema index * Add README.md to bigchaindb.common.schema for introduction to JSON Schema and reasons for YAML * Use constant for schema definitions' base prefix * Move import of ValidationError exception into only the tests that require it * Move validate transaction test helper to tests/common/util.py * move ordered transaction schema load to generate_schema_documentation.py where it's needed * use double backticks to render terms in schema docs * change more backticks and change transaction version description in transaction schema * make details a mandatory property of condition * Many more documentation fixes * rename schema.rst to schema/transaction.rst * Fix documentation for Metadata * Add more links to documentation * Various other documentation fixes * Rename section titles in rendered documentation * use to manage file handle * fix extrenuous comma in test_tx_serialization_with_incorrect_hash args * 'a' * 64 * remove schema validation until we can analyze properly impact on downstream consumers * fix flake8 error * use `with` always
2016-11-22 11:17:06 +01:00
'jsonschema~=2.5.1',
2019-01-13 14:51:16 +01:00
'pyyaml>=4.2b1',
'aiohttp~=3.0',
'bigchaindb-abci>=1.0.2',
'setproctitle~=1.1.0',
'packaging~=18.0',
2016-10-18 03:46:21 +02:00
]
if sys.version_info < (3, 6):
install_requires.append('pysha3~=1.0.2')
2016-02-09 21:50:55 +01:00
setup(
name='BigchainDB',
version=version['__version__'],
description='BigchainDB: The Blockchain Database',
2017-01-17 14:21:08 +01:00
long_description=(
"BigchainDB allows developers and enterprises to deploy blockchain "
"proof-of-concepts, platforms and applications with a blockchain "
2017-01-17 14:21:08 +01:00
"database. BigchainDB supports a wide range of industries and use cases "
"from identity and intellectual property to supply chains, energy, IoT "
"and financial ecosystems. With high throughput, low latency, powerful "
"query functionality, decentralized control, immutable data storage and "
"built-in asset support, BigchainDB is like a database with blockchain "
"characteristics."
2017-01-17 14:21:08 +01:00
),
2016-02-09 21:50:55 +01:00
url='https://github.com/BigchainDB/bigchaindb/',
author='BigchainDB Contributors',
author_email='devs@bigchaindb.com',
license='Apache Software License 2.0',
2016-02-09 21:50:55 +01:00
zip_safe=False,
python_requires='>=3.6',
2016-02-09 21:50:55 +01:00
classifiers=[
'Development Status :: 4 - Beta',
2016-02-22 11:51:17 +01:00
'Intended Audience :: Developers',
'Topic :: Database',
'Topic :: Database :: Database Engines/Servers',
'Topic :: Software Development',
'Natural Language :: English',
'License :: OSI Approved :: Apache Software License',
2016-10-31 15:08:00 +01:00
'Programming Language :: Python :: 3 :: Only',
'Programming Language :: Python :: 3.5',
'Programming Language :: Python :: 3.6',
2016-02-22 11:51:17 +01:00
'Operating System :: MacOS :: MacOS X',
'Operating System :: POSIX :: Linux',
2016-02-09 21:50:55 +01:00
],
2016-03-17 17:17:27 +01:00
packages=find_packages(exclude=['tests*']),
2016-02-10 19:55:33 +01:00
scripts = ['pkg/scripts/bigchaindb-monit-config'],
2016-02-10 19:55:33 +01:00
entry_points={
'console_scripts': [
'bigchaindb=bigchaindb.commands.bigchaindb:main'
2016-02-10 19:55:33 +01:00
],
},
2016-10-18 03:46:21 +02:00
install_requires=install_requires,
setup_requires=['pytest-runner'],
2016-02-12 01:32:00 +01:00
tests_require=tests_require,
extras_require={
'test': tests_require,
'dev': dev_require + tests_require + docs_require,
2016-06-10 14:01:53 +02:00
'docs': docs_require,
},
package_data={'bigchaindb.common.schema': ['*.yaml']},
2016-02-09 21:50:55 +01:00
)