Skip to content

Commit

Permalink
chore(dev): consolidate requirements to setup.py
Browse files Browse the repository at this point in the history
  • Loading branch information
theY4Kman committed Oct 27, 2018
1 parent 149c0d6 commit e7f1119
Show file tree
Hide file tree
Showing 5 changed files with 50 additions and 52 deletions.
24 changes: 9 additions & 15 deletions DEVELOPMENT.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,18 +3,12 @@
We need to clone the project and prepare the dev environment:

```bash
$ git clone https://github.com/manrajgrover/halo.git // or using ssh: [email protected]:manrajgrover/halo.git
$ git clone https://github.com/manrajgrover/halo.git # or using ssh: [email protected]:manrajgrover/halo.git
$ cd halo
$ pip install -e .
$ pip install -e requirements-dev.txt
```

This will install all requirements to use `halo`. You may want to create a virtual environment specifically for this.

To install development dependencies, run:

```bash
$ pip install -r requirements-dev.txt
```
This will install all requirements to use and develop `halo`. You may want to create a virtual environment specifically for this.

#### Testing
Before submitting a pull request, make sure the code passes all the tests and is clean of lint errors:
Expand All @@ -27,15 +21,15 @@ To run tests for specific environment, run:

1. For Python 2.7:

```bash
$ tox -e py27
```
```bash
$ tox -e py27
```

2. For Python 3.6:

```bash
$ tox -e py36
```
```bash
$ tox -e py36
```

For checking lint issues:

Expand Down
5 changes: 1 addition & 4 deletions requirements-dev.txt
Original file line number Diff line number Diff line change
@@ -1,4 +1 @@
coverage==4.4.1
nose==1.3.7
pylint==1.7.2
tox==2.8.2
--editable .[dev]
8 changes: 1 addition & 7 deletions requirements.txt
Original file line number Diff line number Diff line change
@@ -1,7 +1 @@
backports.shutil_get_terminal_size==1.0.0;python_version < '3.3'
log_symbols==0.0.11
spinners==0.0.23
cursor==1.2.0
termcolor==1.1.0
colorama==0.3.9
six==1.11.0
--editable .
58 changes: 36 additions & 22 deletions setup.py
Original file line number Diff line number Diff line change
@@ -1,14 +1,10 @@
from setuptools import setup, find_packages # pylint: disable=no-name-in-module,import-error


def dependencies(file):
with open(file) as f:
return f.read().splitlines()


setup(
name='halo',
packages=find_packages(exclude=('tests', 'examples')),
include_package_data=True,
version='0.0.18',
license='MIT',
description='Beautiful terminal spinners in Python',
Expand All @@ -17,26 +13,44 @@ def dependencies(file):
author_email='[email protected]',
url='https://github.com/manrajgrover/halo',
keywords=[
"console",
"loading",
"indicator",
"progress",
"cli",
"spinner",
"spinners",
"terminal",
"term",
"busy",
"wait",
"idle"
'console',
'loading',
'indicator',
'progress',
'cli',
'spinner',
'spinners',
'terminal',
'term',
'busy',
'wait',
'idle',
],
install_requires=[
'backports.shutil_get_terminal_size==1.0.0;python_version < "3.3"',
'log_symbols==0.0.11',
'spinners==0.0.23',
'cursor==1.2.0',
'termcolor==1.1.0',
'colorama==0.3.9',
'six==1.11.0',
],
install_requires=dependencies('requirements.txt'),
tests_require=dependencies('requirements-dev.txt'),
include_package_data=True,
extras_require={
'ipython': [
'IPython==5.7.0',
'ipywidgets==7.1.0',
]
}
],
'test': [
'coverage==4.4.1',
'nose==1.3.7',
'pylint==1.7.2',
'tox==2.8.2',
],
'dev': [
'halo[test,ipython]',
],
},
tests_require=[
'halo[test]',
],
)
7 changes: 3 additions & 4 deletions tox.ini
Original file line number Diff line number Diff line change
Expand Up @@ -10,10 +10,9 @@ skip_missing_interpreters =
True

[testenv]
deps =
-r{toxinidir}/requirements.txt
-r{toxinidir}/requirements-dev.txt
extras=ipython
extras=
test
ipython
recreate =
True
setenv =
Expand Down

0 comments on commit e7f1119

Please sign in to comment.