Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
  • Loading branch information
N-Holzschuch committed Aug 21, 2023
2 parents 3f8e93d + 676e110 commit 381ce4b
Show file tree
Hide file tree
Showing 185 changed files with 2,961 additions and 1,600 deletions.
7 changes: 0 additions & 7 deletions .coveragerc

This file was deleted.

1 change: 1 addition & 0 deletions .distro/.fmf/version
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
1
3 changes: 3 additions & 0 deletions .distro/packit.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
Filters = [
"unknown-key",
]
3 changes: 3 additions & 0 deletions .distro/plans/main.fmf.dist-git
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
discover:
how: fmf
dist-git-source: true
20 changes: 20 additions & 0 deletions .distro/plans/rpmlint.fmf
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
summary:
Perform rpmlint and rpminspect tests
prepare:
- name: Install rpmlint packages
how: install
package:
- rpmlint
- rpminspect
- rpminspect-data-fedora
#- name: Download the source rpm
# how: shell
# script: cd /tmp && curl -O ${PACKIT_SRPM_URL}
- name: Download rpm packages
how: shell
script: cd /tmp && dnf download ${PACKIT_COPR_RPMS}
discover+:
how: fmf
filter: "tag: rpmlint"
execute:
how: tmt
7 changes: 7 additions & 0 deletions .distro/plans/smoke.fmf
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
summary:
Basic smoke tests
discover+:
how: fmf
filter: "tag: smoke"
execute:
how: tmt
Empty file.
83 changes: 83 additions & 0 deletions .distro/python-scikit-build.spec
Original file line number Diff line number Diff line change
@@ -0,0 +1,83 @@
Name: python-scikit-build
Version: 0.0.0
Release: %autorelease
Summary: Improved build system generator for Python C/C++/Fortran/Cython extensions

# This project is mainly MIT but LICENSE also mentions some code
# that is BSD-2-Clause-Views licensed.
# All bundled(cmake()) files listed are Apache-2.0 licensed.
License: MIT AND BSD-2-Clause-Views AND Apache-2.0
URL: https://github.com/scikit-build/scikit-build
Source: %{pypi_source scikit_build}

BuildArch: noarch
BuildRequires: python3-devel

# For tests:
BuildRequires: cmake
BuildRequires: gcc
BuildRequires: gcc-c++
BuildRequires: gcc-gfortran
BuildRequires: git-core
BuildRequires: ninja-build

%global _description %{expand:
Improved build system generator for CPython C/C++/Fortran/Cython extensions.
Better support is available for additional compilers, build systems, cross
compilation, and locating dependencies and determining their build requirements.
The scikit-build package is fundamentally just glue between the setuptools
Python module and CMake.}

%description %_description

%package -n python3-scikit-build
Summary: %{summary}
Requires: cmake
Requires: ninja-build

# Files listed below are located in skbuild/resources/cmake.
# Since they contain "Copyright 2011 Kitware, Inc." in them we list them as bundled,
# their versions are unknown.
# There is no such copyright in the remaining files so we assume
# they are original part of the project.
Provides: bundled(cmake(FindCython))
Provides: bundled(cmake(FindPythonExtensions))
Provides: bundled(cmake(UseCython))
Provides: bundled(cmake(UseF2PY))
Provides: bundled(cmake(UsePythonExtensions))

%description -n python3-scikit-build %_description


%prep
%autosetup -p1 -n scikit_build-%{version}


%generate_buildrequires
%pyproject_buildrequires -x test


%build
%pyproject_wheel


%install
%pyproject_install
%pyproject_save_files skbuild


%check
# Some tests have assumptions that don't work if the RPM build flags are set,
# so we clean them.
export CFLAGS=' '
export CXXFLAGS=' '
# isolated tests are disabled because they require internet
%pytest -v -m "not isolated and not deprecated and not nosetuptoolsscm"


%files -n python3-scikit-build -f %{pyproject_files}
%doc README.*


%changelog
%autochangelog
13 changes: 13 additions & 0 deletions .distro/tests/rpmlint.fmf
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
# Common test variables
tag:
- rpmlint
tier: 0
path: /

# Define tests
/rpmlint:
summary: Rpmlint spec and rpmfiles
test: rpmlint -c packit.toml -r python-scikit-build.rpmlintrc ./*.spec /tmp/*.rpm
/rpminspect-rpms:
summary: Rpminspect the rpms
test: ls /tmp/*.rpm | xargs -L1 rpminspect-fedora -E metadata,disttag
9 changes: 9 additions & 0 deletions .distro/tests/smoke.fmf
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
# Common test variables
tag:
- smoke
tier: 0
path: /

# Define tests
/version:
test: python3 -c "import skbuild; print(skbuild.__version__)"
6 changes: 0 additions & 6 deletions .flake8

This file was deleted.

4 changes: 4 additions & 0 deletions .git_archival.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
node: $Format:%H$
node-date: $Format:%cI$
describe-name: $Format:%(describe:tags=true,match=*[0-9]*)$
ref-names: $Format:%D$
2 changes: 1 addition & 1 deletion .gitattributes
Original file line number Diff line number Diff line change
Expand Up @@ -20,4 +20,4 @@
*.PDF diff=astextplain
*.rtf diff=astextplain
*.RTF diff=astextplain
skbuild/_version.py export-subst
.git_archival.txt export-subst
36 changes: 0 additions & 36 deletions .github/actions/setup-nox/action.yml

This file was deleted.

7 changes: 4 additions & 3 deletions .codecov.yml → .github/codecov.yml
Original file line number Diff line number Diff line change
@@ -1,3 +1,6 @@
codecov:
notify:
after_n_builds: 8
coverage:
status:
project:
Expand All @@ -6,6 +9,4 @@ coverage:
threshold: 2
patch:
default:
# 75% of the changed code must be covered by tests
threshold: 25
only_pulls: true
informational: true
7 changes: 4 additions & 3 deletions .github/workflows/cd.yml
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,9 @@ jobs:

publish:
needs: [dist]
environment: pypi
permissions:
id-token: write
runs-on: ubuntu-latest
if: github.event_name == 'release' && github.event.action == 'published'

Expand All @@ -36,6 +39,4 @@ jobs:
name: artifact
path: dist

- uses: pypa/gh-action-pypi-publish@v1.5.1
with:
password: ${{ secrets.pypi_password }}
- uses: pypa/gh-action-pypi-publish@release/v1
Loading

0 comments on commit 381ce4b

Please sign in to comment.