Skip to content

Commit

Permalink
Merge pull request #262 from ff137/add-python-requirements
Browse files Browse the repository at this point in the history
Add python requirements file and update dependabot workflow
  • Loading branch information
andrewwhitehead authored Jun 5, 2024
2 parents 19034c9 + 594c2a1 commit 95a0036
Show file tree
Hide file tree
Showing 4 changed files with 24 additions and 1 deletion.
12 changes: 12 additions & 0 deletions .github/dependabot.yml
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,18 @@ updates:
- dependency-name: "*"
update-types: ["version-update:semver-major", "version-update:semver-patch"]

# Maintain dependencies for pip
- package-ecosystem: "pip"
directory: "/wrappers/python"
schedule:
interval: "weekly"
day: "monday"
time: "04:00"
timezone: "Canada/Pacific"
ignore:
- dependency-name: "*"
update-types: ["version-update:semver-major", "version-update:semver-patch"]

# Maintain dependencies for Cargo Packages
- package-ecosystem: "cargo"
directory: "/"
Expand Down
2 changes: 2 additions & 0 deletions wrappers/python/requirements.dev.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
pytest~=8.2.1
pytest-asyncio~=0.23.7
1 change: 1 addition & 0 deletions wrappers/python/requirements.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
cached_property~=1.5.2
10 changes: 9 additions & 1 deletion wrappers/python/setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@

import os
import runpy

from setuptools import find_packages, setup

PACKAGE_NAME = "aries_askar"
Expand All @@ -12,6 +13,12 @@
long_description = fh.read()


def parse_requirements(filename: str):
"""Load requirements from a pip requirements file."""
line_iter = (line.strip() for line in open(filename))
return [line for line in line_iter if line and not line.startswith("#")]


if __name__ == "__main__":
setup(
name=PACKAGE_NAME,
Expand All @@ -22,7 +29,8 @@
long_description_content_type="text/markdown",
url="https://github.com/hyperledger/aries-askar",
packages=find_packages(),
install_requires=["cached_property~=1.5"],
install_requires=parse_requirements("requirements.txt"),
tests_require=parse_requirements("requirements.dev.txt"),
include_package_data=True,
package_data={
"": [
Expand Down

0 comments on commit 95a0036

Please sign in to comment.