replace requirements-dev.txt => environment.yml

This commit is contained in:
Casper da Costa-Luis 2020-12-25 00:17:59 +00:00
parent 6f75af72a3
commit ff7044733c
No known key found for this signature in database
GPG Key ID: 986B408043AE090D
5 changed files with 37 additions and 14 deletions

View File

@ -119,7 +119,7 @@ This section is intended for the project's maintainers and describes
how to build and upload a new release. Once again,
`[python setup.py] make [<alias>]` will help.
Also consider `pip install`ing development utilities:
`-r requirements-dev.txt` or `tqdm[dev]`.
`pip install tqdm[dev]` at a minimum, or a more thorough `conda env create`.
## Pre-commit Hook

33
environment.yml Normal file
View File

@ -0,0 +1,33 @@
# development environment
name: tqdm
channels:
- conda-forge
- defaults
dependencies:
# base
- python=3
- pip
- ipykernel
- setuptools
- setuptools_scm
- toml
# test env managers
- tox
- asv
# tests (native)
- pytest
- pytest-cov
- pytest-asyncio # [py>=3.7]
- flake8
- coverage
# extras
- matplotlib
- numpy
- pandas
- tensorflow
- twine # pymake pypi
- argopt # cd wiki && pymake
- wheel # setup.py bdist_wheel
- pip:
- py-make >=0.1.0 # setup.py make/pymake
- pydoc-markdown # cd docs && pymake

View File

@ -1,5 +0,0 @@
py-make>=0.1.0 # setup.py make/pymake
twine # pymake pypi
argopt # cd wiki && pymake
pydoc-markdown # cd docs && pymake
wheel # setup.py bdist_wheel

View File

@ -101,6 +101,8 @@ python_requires = >=2.7, !=3.0.*, !=3.1.*, !=3.2.*, !=3.3.*
tests_require = pytest; flake8; coverage
include_package_data = True
packages = find:
[options.extras_require]
dev=py-make>=0.1.0; twine; wheel
[options.entry_points]
console_scripts =
tqdm = tqdm.cli:main

View File

@ -1,6 +1,5 @@
#!/usr/bin/env python
# -*- coding: utf-8 -*-
from io import open as io_open
from setuptools import setup
import os
import sys
@ -13,10 +12,4 @@ if sys.argv[1].lower().strip() == 'make': # exec Makefile commands
# Stop to avoid setup.py raising non-standard command error
sys.exit(0)
extras_require = {}
requirements_dev = os.path.join(src_dir, 'requirements-dev.txt')
with io_open(requirements_dev, mode='r') as fd:
extras_require['dev'] = [i.strip().split('#', 1)[0].strip()
for i in fd.read().strip().split('\n')]
setup(use_scm_version=True, extras_require=extras_require)
setup(use_scm_version=True)