Skip to content

Commit 713141a

Browse files
committed
Use setuptools extras for extra dependencies
Fixes #44
1 parent ee5f87c commit 713141a

File tree

5 files changed

+17
-15
lines changed

5 files changed

+17
-15
lines changed

Dockerfile

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,5 @@ ADD . /config-merger/
66

77
RUN apt-get update && apt-get install -y make curl
88

9-
RUN python -m pip install --upgrade pip && pip3 install -r requirements.txt
10-
RUN pip3 install .
9+
RUN python -m pip install --upgrade pip && pip3 install .[extras]
1110
RUN rm -rf /config-merger/*

MANIFEST.in

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,2 @@
11
include README.md
2-
include requirements.txt
32
recursive-include examples *

README.md

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -43,6 +43,8 @@ Idea came from puppet's hiera.
4343

4444
```sh
4545
pip install himl
46+
# or, optionally install with extras dependencies: vault and aws interpolation support
47+
pip install himl[extras]
4648
```
4749

4850
### Using `docker` image
@@ -57,7 +59,7 @@ See all docker tags at: https://github.com/adobe/himl/pkgs/container/himl/versio
5759
```
5860
git clone https://github.com/adobe/himl
5961
cd himl
60-
sudo python setup.py install
62+
sudo python install -e .[extras]
6163
```
6264

6365
## Examples

requirements.txt

Lines changed: 0 additions & 7 deletions
This file was deleted.

setup.py

Lines changed: 13 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -9,9 +9,6 @@
99
with open('README.md', encoding="utf-8") as f:
1010
_readme = f.read()
1111

12-
_mydir = os.path.abspath(os.path.dirname(sys.argv[0]))
13-
_requires = [ r for r in open(os.path.sep.join((_mydir,'requirements.txt')), "r").read().split('\n') if len(r)>1 ]
14-
1512
setup(
1613
name='himl',
1714
version="0.9.0",
@@ -46,7 +43,19 @@
4643
],
4744
packages=['himl'],
4845
include_package_data=True,
49-
install_requires=_requires,
46+
install_requires=[
47+
'deepmerge==1.0.1',
48+
'lru_cache==0.2.3',
49+
'backports.functools_lru_cache==1.6.4',
50+
'pathlib2==2.3.7.post1',
51+
'pyyaml==6.0'
52+
],
53+
extras_require={
54+
'extras': [
55+
'boto3==1.22.12',
56+
'hvac==0.11.2'
57+
]
58+
},
5059
entry_points={
5160
'console_scripts': [
5261
'himl = himl.main:run',

0 commit comments

Comments
 (0)