Skip to content

Commit 335d0cf

Browse files
Merge pull request #40 from aboutcode-org/system-provided
Add system_provided to extra_requires
2 parents 3f5d6e3 + cb41983 commit 335d0cf

File tree

129 files changed

+432
-146
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

129 files changed

+432
-146
lines changed
Lines changed: 33 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,33 @@
1+
name: Test CI Linux ARM
2+
3+
on: [push, pull_request]
4+
5+
jobs:
6+
build:
7+
runs-on: ${{ matrix.os }}
8+
9+
strategy:
10+
max-parallel: 2
11+
matrix:
12+
os: [ubuntu-24.04-arm]
13+
python-version: ["3.10", "3.14"]
14+
15+
steps:
16+
- name: Checkout code
17+
uses: actions/checkout@v4
18+
19+
- name: Set up Python ${{ matrix.python-version }}
20+
uses: actions/setup-python@v5
21+
with:
22+
python-version: ${{ matrix.python-version }}
23+
24+
- name: Install system dependencies
25+
run: |
26+
sudo apt update
27+
sudo apt install libarchive-tools libarchive-dev libmagic1 libmagic-dev
28+
29+
- name: Set up venv
30+
run: ./configure --dev-system-provided
31+
32+
- name: Run tests
33+
run: venv/bin/pytest -n 3 -vvs .

.github/workflows/test-ci-mac.yml

Lines changed: 33 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,33 @@
1+
name: Test CI Macos ARM
2+
3+
on: [push, pull_request]
4+
5+
jobs:
6+
build:
7+
runs-on: ${{ matrix.os }}
8+
9+
strategy:
10+
max-parallel: 4
11+
matrix:
12+
os: [macos-14, macos-15]
13+
python-version: ["3.10", "3.14"]
14+
15+
steps:
16+
- name: Checkout code
17+
uses: actions/checkout@v4
18+
19+
- name: Set up Python ${{ matrix.python-version }}
20+
uses: actions/setup-python@v5
21+
with:
22+
python-version: ${{ matrix.python-version }}
23+
24+
- name: Install system dependencies
25+
run: |
26+
brew update
27+
brew install libarchive libmagic
28+
29+
- name: Set up venv
30+
run: ./configure --dev-system-provided
31+
32+
- name: Run tests
33+
run: venv/bin/pytest -n 3 -vvs .

.gitignore

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -56,7 +56,6 @@ pyvenv.cfg
5656

5757
# Various junk and temp files
5858
.DS_Store
59-
*~
6059
.*.sw[po]
6160
.build
6261
.ve

configure

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -30,6 +30,7 @@ CLI_ARGS=$1
3030
# Requirement arguments passed to pip and used by default or with --dev.
3131
REQUIREMENTS="--editable . --constraint requirements.txt"
3232
DEV_REQUIREMENTS="--editable .[dev,full] --constraint requirements.txt --constraint requirements-dev.txt"
33+
DEV_SYSTEM_REQUIREMENTS="--editable .[dev,system_provided] --constraint requirements.txt --constraint requirements-dev.txt"
3334

3435
# where we create a virtualenv
3536
VIRTUALENV_DIR=venv
@@ -185,6 +186,7 @@ while getopts :-: optchar; do
185186
help ) cli_help;;
186187
clean ) find_python && clean;;
187188
dev ) CFG_REQUIREMENTS="$DEV_REQUIREMENTS";;
189+
dev-system-provided ) CFG_REQUIREMENTS="$DEV_SYSTEM_REQUIREMENTS";;
188190
esac;;
189191
esac
190192
done

setup.cfg

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -67,6 +67,9 @@ where = src
6767
full =
6868
typecode_libmagic >= 5.39.210223
6969

70+
system_provided =
71+
typecode_libmagic_system_provided >= 32.0.0
72+
7073
dev =
7174
pytest >= 7.0.1
7275
pytest-xdist >= 2

src/typecode/contenttype.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -163,7 +163,7 @@ class Type(object):
163163
)
164164

165165
# FIXME: we should use an introspectable attrs class instead
166-
# ATTENTION: keep this in sync with sloats and properties
166+
# ATTENTION: keep this in sync with slots and properties
167167
text_attributes = [
168168
"filetype_file",
169169
"mimetype_file",

tests/data/filetest/archive/a.tar.gz.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
filetype_file: gzip compressed data, last modified
1+
filetype_file: gzip compressed data
22
mimetype_file: application/gzip
33
mimetype_python: application/x-tar
44
is_file: yes

tests/data/filetest/archive/e.tar.bz2.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
filetype_file: bzip2 compressed data, block size = 900k
1+
filetype_file: bzip2 compressed data
22
mimetype_file: application/x-bzip2
33
mimetype_python: application/x-tar
44
is_file: yes

tests/data/filetest/archive/e.tar.gz.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
filetype_file: gzip compressed data, last modified
1+
filetype_file: gzip compressed data
22
mimetype_file: application/gzip
33
mimetype_python: application/x-tar
44
is_file: yes

tests/data/filetest/archive/file_4.26-1.diff.gz.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
filetype_file: gzip compressed data, last modified
1+
filetype_file: gzip compressed data
22
mimetype_file: application/gzip
33
is_file: yes
44
is_regular: yes

0 commit comments

Comments
 (0)