2018-01-25 08:00:28 +08:00
|
|
|
#!/usr/bin/env python
|
|
|
|
# -*- coding: utf-8 -*-
|
2019-11-28 03:21:16 +08:00
|
|
|
import os
|
|
|
|
|
2019-11-27 04:55:59 +08:00
|
|
|
from setuptools import find_packages, setup
|
2019-01-10 01:57:41 +08:00
|
|
|
|
2019-07-24 15:54:30 +08:00
|
|
|
extras_require = {
|
|
|
|
"test": [
|
2019-07-24 16:34:55 +08:00
|
|
|
"pytest>=4.6.3,<5.0.0",
|
2019-11-27 04:34:18 +08:00
|
|
|
"pytest-xdist>=1.30.0,<2",
|
2019-07-24 16:34:55 +08:00
|
|
|
"pytest-asyncio>=0.10.0,<1.0.0",
|
2019-11-27 04:34:18 +08:00
|
|
|
"factory-boy>=2.12.0,<3.0.0",
|
2019-07-24 15:54:30 +08:00
|
|
|
],
|
2019-08-14 05:36:42 +08:00
|
|
|
"lint": [
|
2019-11-27 04:34:18 +08:00
|
|
|
"flake8==3.7.9", # flake8 is not semver: it has added new warnings at minor releases
|
|
|
|
"isort==4.3.21",
|
2019-11-27 07:38:32 +08:00
|
|
|
"mypy==0.740", # mypy is not semver: it has added new warnings at minor releases
|
2019-08-16 07:01:44 +08:00
|
|
|
"mypy-protobuf==1.15",
|
2019-08-14 05:36:42 +08:00
|
|
|
"black==19.3b0",
|
2019-11-27 04:34:18 +08:00
|
|
|
"flake8-bugbear>=19.8.0,<20",
|
|
|
|
"docformatter>=1.3.1,<2",
|
2018-01-25 08:00:28 +08:00
|
|
|
],
|
2019-11-27 04:55:59 +08:00
|
|
|
"doc": [
|
2019-11-27 09:29:13 +08:00
|
|
|
"Sphinx>=2.2.1,<3",
|
2019-11-27 04:34:18 +08:00
|
|
|
"sphinx_rtd_theme>=0.4.3,<=1",
|
2019-07-29 18:51:01 +08:00
|
|
|
"towncrier>=19.2.0, <20",
|
2019-08-14 05:36:42 +08:00
|
|
|
],
|
2019-11-15 04:47:21 +08:00
|
|
|
"dev": [
|
|
|
|
"bumpversion>=0.5.3,<1",
|
2018-01-31 07:37:40 +08:00
|
|
|
"pytest-watch>=4.1.0,<5",
|
2018-01-25 08:00:28 +08:00
|
|
|
"wheel",
|
2018-06-07 09:35:31 +08:00
|
|
|
"twine",
|
2018-01-31 07:18:59 +08:00
|
|
|
"ipython",
|
2019-11-15 04:47:21 +08:00
|
|
|
"setuptools>=36.2.0",
|
|
|
|
"tox>=3.13.2,<4.0.0",
|
|
|
|
],
|
2019-07-24 15:54:30 +08:00
|
|
|
}
|
|
|
|
|
2019-08-14 05:36:42 +08:00
|
|
|
extras_require["dev"] = (
|
2019-11-27 04:55:59 +08:00
|
|
|
extras_require["dev"]
|
|
|
|
+ extras_require["test"]
|
|
|
|
+ extras_require["lint"]
|
|
|
|
+ extras_require["doc"]
|
2019-08-14 05:36:42 +08:00
|
|
|
)
|
2019-07-24 15:54:30 +08:00
|
|
|
|
|
|
|
|
2019-11-15 05:43:42 +08:00
|
|
|
with open("./README.md") as readme:
|
|
|
|
long_description = readme.read()
|
|
|
|
|
|
|
|
|
2019-11-28 03:21:16 +08:00
|
|
|
install_requires = [
|
|
|
|
"pycryptodome>=3.9.2,<4.0.0",
|
|
|
|
"base58>=1.0.3,<2.0.0",
|
|
|
|
"pymultihash>=0.8.2",
|
|
|
|
"multiaddr>=0.0.8,<0.1.0",
|
|
|
|
"rpcudp>=3.0.0,<4.0.0",
|
|
|
|
"lru-dict>=1.1.6",
|
|
|
|
"protobuf>=3.10.0,<4.0.0",
|
|
|
|
"coincurve>=10.0.0,<11.0.0",
|
|
|
|
"pynacl==1.3.0",
|
2019-12-03 07:57:22 +08:00
|
|
|
"dataclasses>=0.7, <1;python_version<'3.7'",
|
2019-12-11 09:07:21 +08:00
|
|
|
"async_generator==1.10",
|
2019-11-28 03:21:16 +08:00
|
|
|
]
|
|
|
|
|
|
|
|
|
|
|
|
# NOTE: Some dependencies break RTD builds. We can not install system dependencies on the
|
|
|
|
# RTD system so we have to exclude these dependencies when we are in an RTD environment.
|
|
|
|
readthedocs_is_building = os.environ.get("READTHEDOCS", False)
|
|
|
|
if not readthedocs_is_building:
|
|
|
|
install_requires.append("fastecdsa==1.7.4")
|
|
|
|
|
|
|
|
|
2018-01-25 08:00:28 +08:00
|
|
|
setup(
|
2019-01-10 01:57:41 +08:00
|
|
|
name="libp2p",
|
2018-01-25 08:00:28 +08:00
|
|
|
# *IMPORTANT*: Don't manually change the version here. Use `make bump`, as described in readme
|
2019-12-13 05:59:52 +08:00
|
|
|
version="0.1.4",
|
2019-11-27 04:34:18 +08:00
|
|
|
description="libp2p implementation written in python",
|
2019-11-15 05:43:42 +08:00
|
|
|
long_description=long_description,
|
|
|
|
long_description_content_type="text/markdown",
|
2019-11-15 04:47:21 +08:00
|
|
|
maintainer="The Ethereum Foundation",
|
|
|
|
maintainer_email="snakecharmers@ethereum.org",
|
2019-11-27 04:44:17 +08:00
|
|
|
url="https://github.com/libp2p/py-libp2p",
|
2018-01-25 08:00:28 +08:00
|
|
|
include_package_data=True,
|
2019-11-28 03:21:16 +08:00
|
|
|
install_requires=install_requires,
|
2019-12-03 07:57:22 +08:00
|
|
|
python_requires=">=3.6,<4",
|
2019-07-24 15:54:30 +08:00
|
|
|
extras_require=extras_require,
|
2019-11-27 04:44:17 +08:00
|
|
|
py_modules=["libp2p"],
|
2019-11-27 04:34:18 +08:00
|
|
|
license="MIT/APACHE2.0",
|
2019-01-10 01:57:41 +08:00
|
|
|
zip_safe=False,
|
2019-11-15 05:43:42 +08:00
|
|
|
keywords="libp2p p2p",
|
2018-01-25 08:00:28 +08:00
|
|
|
packages=find_packages(exclude=["tests", "tests.*"]),
|
|
|
|
classifiers=[
|
2019-11-27 04:34:18 +08:00
|
|
|
"Development Status :: 4 - Beta",
|
|
|
|
"Intended Audience :: Developers",
|
|
|
|
"License :: OSI Approved :: MIT License",
|
|
|
|
"License :: OSI Approved :: Apache Software License",
|
|
|
|
"Natural Language :: English",
|
|
|
|
"Programming Language :: Python :: 3",
|
2019-12-11 09:07:21 +08:00
|
|
|
"Programming Language :: Python :: 3.6",
|
2019-11-27 04:34:18 +08:00
|
|
|
"Programming Language :: Python :: 3.7",
|
2018-01-25 08:00:28 +08:00
|
|
|
],
|
2019-11-27 04:34:18 +08:00
|
|
|
platforms=["unix", "linux", "osx"],
|
2019-01-10 01:57:41 +08:00
|
|
|
)
|