Reintroduce pip extras docs, dev, deploy, and benchmark.

pull/1931/head
Kieran R. Prasch 2020-04-24 12:00:46 -07:00
parent f129c54158
commit e293666e0c
5 changed files with 48 additions and 17 deletions

View File

@ -76,11 +76,13 @@ lock: clean
env: lock
# Relock dependencies and generate a pipenv virtualenv from the result
pipenv run pip install -e . -r dev-requirements.txt
pipenv run nucypher --version
pipenv run pip install -e .[dev]
pipenv shell
nucypher --version
install: clean
# Development installation
pipenv run pip install -e . -r dev-requirements.txt
pipenv run pip install -e .[dev]
# Show installed version and verify entry point
pipenv run nucypher --version
pipenv shell
nucypher --version

15
Pipfile
View File

@ -12,14 +12,16 @@ umbral = "==0.1.3a2"
constant-sorrow = ">=0.1.0a9"
bytestring-splitter = ">=1.3.0"
hendrix = ">=3.2.5"
# Third-Party
# Cryptography
pyopenssl = "*"
cryptography = ">=2.3"
pysha3="*"
requests = "*"
# Utilities
maya = "*"
sqlalchemy = "*"
marshmallow = "*"
maya = "*"
# Web
requests = "*"
flask = "*"
flask_sqlalchemy = "*"
# Third-Party Ethereum
@ -41,17 +43,14 @@ pytest-xdist = "*"
pytest-twisted = "*"
pytest-cov = "*"
pytest-mock = "*"
# Tools
# Quality Tools
pre-commit = "*"
pyflakes = "*"
bandit = "*"
mypy = "*"
coverage = "*"
# Deployment
# Devleop & Deploy
py-solc-x = "*"
ansible = "*"
bumpversion = "*"
[scripts]
install-solc = "python3 scripts/installation/install_solc.py"

View File

@ -13,9 +13,15 @@ formats: all
# Optionally set the version of Python and requirements required to build your docs
python:
version: 3.7
version: 3.8
install:
- requirements: docs/requirements.txt
- requirements: requirements.txt
- method: pip
path: .
extra_requirements:
- docs
- method: setuptools
path: package
build:
image: latest

View File

@ -94,15 +94,39 @@ class PostDevelopCommand(develop):
# Dependencies
#
with open(os.path.join(BASE_DIR, "requirements.txt")) as f:
_PIP_FLAGS, *INSTALL_REQUIRES = f.read().split('\n')
def read_requirements(path):
with open(os.path.join(BASE_DIR, path)) as f:
_PIPENV_FLAGS, *REQUIREMENTS = f.read().split('\n')
return REQUIREMENTS
INSTALL_REQUIRES = read_requirements('requirements.txt')
DOCS_REQUIRE = read_requirements('docs-requirements.txt')
DEV_REQUIRES = read_requirements('dev-requirements.txt')
BENCHMARK_REQUIRES = [
'pytest-benchmark'
]
DEPLOY_REQUIRES = [
'bumpversion',
'ansible'
]
EXTRAS = {
'docs': DOCS_REQUIRE,
'dev': DEV_REQUIRES + DOCS_REQUIRE,
'benchmark': DEV_REQUIRES + BENCHMARK_REQUIRES
}
setup(
# Requirements
python_requires='>=3',
setup_requires=['pytest-runner'], # required for `setup.py test`
setup_requires=['pytest-runner'],
install_requires=INSTALL_REQUIRES,
extras_require=EXTRAS,
# Package Data
packages=find_packages(exclude=["tests"]),