Skip to content

Commit

Permalink
Add optional dependencies to requirements.txt during build time
Browse files Browse the repository at this point in the history
This will allow optional deps to be updated using pip dependency
resolution
  • Loading branch information
Odilhao committed Oct 21, 2024
1 parent 76595bc commit 1f6bae3
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 1 deletion.
4 changes: 3 additions & 1 deletion .github/workflows/generate-package-list.yml
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,9 @@ jobs:
- name: Install dnf-plugins-core
run: dnf install 'dnf-command(config-manager)' -y && dnf config-manager --set-enabled crb
- name: Install Required Packages
run: dnf install -y gobject-introspection-devel rpmdevtools rpm-build cairo-gobject-devel cairo-devel gcc make cmake python3.11-devel python3.11-wheel python3.11-pip
run: dnf install -y gobject-introspection-devel rpmdevtools rpm-build cairo-gobject-devel cairo-devel gcc make cmake postgresql-devel python3.11-devel python3.11-wheel python3.11-pip
- name: Add optional dependencies to requirements.txt
run: ./add_optional_packages.sh
- name: Install Pulp using requirements.txt
run: pip3.11 install -r $PULPCORE_REQUIREMENTS
- name: Collect List of packages
Expand Down
4 changes: 4 additions & 0 deletions add_optional_packages.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
#!/bin/bash

echo "django-storages[boto3,google,s3,azure]" >> automation/requirements.txt
echo "psycopg[c]" >> automation/requirements.txt
2 changes: 2 additions & 0 deletions find_package.py
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,8 @@ def parse_package_list(lines):
name = name.replace('.', '-')
elif name.startswith('galaxy_importer'):
name = name.replace('_', '-')
elif name.startswith('psycopg-c'):
name = name.replace('-', '_')
#Lower Case all libs that needs to be lowercased(is this a verb?)
elif name.startswith('PyYAML'):
name = name.lower()
Expand Down

0 comments on commit 1f6bae3

Please sign in to comment.