Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Use setuptools extras for extra dependencies #91

Merged
merged 1 commit into from
Jun 3, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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