Skip to content

Commit

Permalink
Use setuptools extras for extra dependencies
Browse files Browse the repository at this point in the history
Fixes #44
  • Loading branch information
amuraru committed May 29, 2022
1 parent ee5f87c commit 538f099
Show file tree
Hide file tree
Showing 6 changed files with 17 additions and 16 deletions.
1 change: 0 additions & 1 deletion .github/workflows/publish-to-pypi.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,6 @@ jobs:
- name: Install dependencies
run: |
python -m pip install --upgrade pip
pip install -r requirements.txt
- name: Run tests
run: |
Expand Down
3 changes: 1 addition & 2 deletions Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,5 @@ ADD . /config-merger/

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

RUN python -m pip install --upgrade pip && pip3 install -r requirements.txt
RUN pip3 install .
RUN python -m pip install --upgrade pip && pip3 install .[extras]
RUN rm -rf /config-merger/*
1 change: 0 additions & 1 deletion MANIFEST.in
Original file line number Diff line number Diff line change
@@ -1,3 +1,2 @@
include README.md
include requirements.txt
recursive-include examples *
4 changes: 3 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -43,6 +43,8 @@ Idea came from puppet's hiera.

```sh
pip install himl
# or, optionally install with extras dependencies: vault and aws interpolation support
pip install himl[extras]
```

### Using `docker` image
Expand All @@ -57,7 +59,7 @@ See all docker tags at: https://github.com/adobe/himl/pkgs/container/himl/versio
```
git clone https://github.com/adobe/himl
cd himl
sudo python setup.py install
sudo python install -e .[extras]
```

## Examples
Expand Down
7 changes: 0 additions & 7 deletions requirements.txt

This file was deleted.

17 changes: 13 additions & 4 deletions setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -9,9 +9,6 @@
with open('README.md', encoding="utf-8") as f:
_readme = f.read()

_mydir = os.path.abspath(os.path.dirname(sys.argv[0]))
_requires = [ r for r in open(os.path.sep.join((_mydir,'requirements.txt')), "r").read().split('\n') if len(r)>1 ]

setup(
name='himl',
version="0.9.0",
Expand Down Expand Up @@ -46,7 +43,19 @@
],
packages=['himl'],
include_package_data=True,
install_requires=_requires,
install_requires=[
'deepmerge==1.0.1',
'lru_cache==0.2.3',
'backports.functools_lru_cache==1.6.4',
'pathlib2==2.3.7.post1',
'pyyaml==6.0'
],
extras_require={
'extras': [
'boto3==1.22.12',
'hvac==0.11.2'
]
},
entry_points={
'console_scripts': [
'himl = himl.main:run',
Expand Down

0 comments on commit 538f099

Please sign in to comment.