Skip to content

Commit 5b1fe9a

Browse files
authored
Merge pull request #2122 from NicholasBHubbard/fix-ci
Fix failing CI
2 parents d9be498 + 3fd28b5 commit 5b1fe9a

8 files changed

Lines changed: 13 additions & 122 deletions

File tree

.github/workflows/ruby.yml

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ on:
77

88
jobs:
99
test:
10-
runs-on: ubuntu-22.04
10+
runs-on: ubuntu-24.04
1111
strategy:
1212
matrix:
1313
ruby-version: ['2.7', '3.0', '3.1', '3.4']
@@ -20,7 +20,8 @@ jobs:
2020
with:
2121
ruby-version: ${{ matrix.ruby-version }}
2222
bundler-cache: true # runs 'bundle install' and caches installed gems automatically
23-
- run: |
23+
- name: Run test suite
24+
run: |
2425
if [ ! -z "$RUNNER_DEBUG" ] ; then
2526
DEBUG=1 bundle exec rspec -fd
2627
else

docs/installation.rst

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -36,6 +36,7 @@ Some package formats require other tools to be installed on your machine to be b
3636

3737
* RPM: rpm/rpm-tools/rpm-build [This dependency might be removed in the future, see `issue #54`_ on github]
3838
* Snap: squashfs/squashfs-tools
39+
* Python: a requirements.txt file is provided to list Python dependencies: `$ pip install -r requirements.txt`
3940

4041
.. _issue #54: https://github.com/jordansissel/fpm/issues/54
4142

lib/fpm/package/pyfpm/get_metadata.py

Lines changed: 0 additions & 115 deletions
This file was deleted.

lib/fpm/package/pyfpm/parse_requires.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@
22

33
#import pkg_resources
44
import packaging.requirements
5+
import packaging.markers
56
import json
67
import sys
78

@@ -11,10 +12,9 @@
1112
# Process environment markers, if any, and produce a list of requirements for the current environment.
1213
def evaluate_requirements(fd):
1314
all_requirements = [packaging.requirements.Requirement(line) for line in sys.stdin]
14-
15+
default_env = packaging.markers.default_environment()
1516
for req in all_requirements:
16-
# XXX: Note: marker.evaluate() can be given a dict() containing environment values to overwrite
17-
if req.marker is None or req.marker.evaluate():
17+
if req.marker is None or req.marker.evaluate(environment=default_env):
1818
if len(req.specifier) > 0:
1919
for spec in req.specifier:
2020
yield "%s%s" % (req.name, spec)

lib/fpm/package/python.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -605,7 +605,7 @@ def install_to_staging(path)
605605
flags = [ "--root", staging_path ]
606606
flags += [ "--prefix", prefix ] if !attributes[:prefix].nil?
607607

608-
safesystem(*attributes[:python_pip], "install", "--no-deps", *flags, path)
608+
safesystem(*attributes[:python_pip], "install", "--no-deps", "--ignore-installed", *flags, path)
609609
end # def install_to_staging
610610

611611
public(:input)

requirements.txt

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
# Listing of fpm's Python package dependencies
2+
packaging

spec/fpm/package/deb_spec.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -400,7 +400,7 @@ def dpkg_field(field)
400400
subject.attributes[:deb_user] = "root"
401401
subject.attributes[:deb_group] = "root"
402402
subject.category = "comm"
403-
subject.dependencies << "lsb-base"
403+
subject.dependencies << "debconf"
404404

405405
subject.instance_variable_set(:@staging_path, staging_path)
406406

spec/requirements.txt

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
# Listing of fpm test-suite's Python package dependencies
2+
setuptools

0 commit comments

Comments
 (0)