Skip to content

Commit

Permalink
Refactor dependency code and GitHub Action install testing
Browse files Browse the repository at this point in the history
  • Loading branch information
clach04 committed Nov 27, 2024
1 parent 0d34648 commit e1657e7
Show file tree
Hide file tree
Showing 4 changed files with 21 additions and 13 deletions.
7 changes: 4 additions & 3 deletions .github/workflows/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -34,9 +34,10 @@ jobs:
run: env PYTHONWARNINGS="ignore::DeprecationWarning" python -m pip install --upgrade pip
- name: Display Python version
run: python --version
- name: Install dependencies
run: env PYTHONWARNINGS="ignore::DeprecationWarning" python -m pip install -r requirements.txt
#- name: Install dependencies
# run: env PYTHONWARNINGS="ignore::DeprecationWarning" python -m pip install -r requirements.txt
- name: install
run: python -m pip install -e .
run: python -m pip install -e .[all]
- name: Run Python tests
# TODO consider -v
run: python -m puren_tonbo.tests.testsuite
1 change: 0 additions & 1 deletion requirements.txt
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,6 @@ pyzipper; python_version > "2.7"
python-gnupg
openssl_enc_compat # https://github.com/clach04/openssl_enc_compat/
jenc>=0.0.3
age; python_version > "2.7" # 0.5.1
# pywin32 # Windows only - for GUI password prompt

percolator
1 change: 1 addition & 0 deletions requirements_optional.txt
Original file line number Diff line number Diff line change
@@ -1 +1,2 @@
age; python_version > "2.7" # 0.5.1 - CPython only, not pypy/jython
pywin32 # not sure how to make this conditional on platform
25 changes: 16 additions & 9 deletions setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -70,6 +70,21 @@
# https://setuptools.pypa.io/en/latest/userguide/dependency_management.html#optional-dependencies
# https://stackoverflow.com/questions/10572603/specifying-optional-dependencies-in-pypi-python-setup-py

extras_require = {
'chi_io': ['chi_io', ],
'jenc': ['jenc>=0.0.3', ], # NOTE test suite and v002 support actually needs minimum of jenc-0.0.5
# TODO pyvim
# TODO python-gnupg (consider replacements before implementing https://github.com/clach04/puren_tonbo/issues/118)
}
if is_cpython and is_py3:
extras_require['age'] ['age', ], # 0.5.1 is known to work
#'ssage': ['ssage', ], # ssage-1.4.0

extras_require_all = []
for extra_name in extras_require:
extras_require_all.append(extras_require[extra_name])
extras_require['all'] = extras_require_all # convenience, all of the above. NOTE duplicate of above

# disable package finding, explictly list package
find_packages = False
if find_packages:
Expand Down Expand Up @@ -129,14 +144,6 @@
],
platforms='any', # or distutils.util.get_platform()
install_requires=install_requires,
extras_require={
'age': ['age', ], # 0.5.1 - NOTE only for is_py3
'chi_io': ['chi_io', ],
'jenc': ['jenc>=0.0.3', ], # NOTE test suite and v002 support actually needs minimum of jenc-0.0.5
#'ssage': ['ssage', ], # ssage-1.4.0
# TODO pyvim
# TODO python-gnupg (consider replacements before implementing https://github.com/clach04/puren_tonbo/issues/118)
'all': ['age', 'chi_io', 'jenc>=0.0.3',], # convenience, all of the above. NOTE duplicate of above
},
extras_require=extras_require,
zip_safe=True,
)

0 comments on commit e1657e7

Please sign in to comment.