Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
38 changes: 3 additions & 35 deletions content/other-tools/04_distros.md
Original file line number Diff line number Diff line change
Expand Up @@ -27,41 +27,9 @@ If your project is not yet packaged, that's fine, you can do it yourself.
The only files you need to manage are a `.spec` file and a `packit` configuration[^2].
The spec file can be quite minimal and low/no maintenance:

```rpmspec
Name: foo
Version: 0.0.0
Release: %autorelease
Summary: Example package
License: Unlicense
URL: https://example.com
Source: %{pypi_source foo}
BuildRequires: python3-devel

%description
Lorem ipsum

%prep
%autosetup -n foo-%{version}

%generate_buildrequires
%pyproject_buildrequires -x test

%build
%pyproject_wheel

%install
%pyproject_install
%pyproject_save_files foo

%check
%pytest

%files -f %{pyproject_files}
%license LICENSE
%doc README.md

%changelog
%autochangelog
```{literalinclude} ../../examples/5_04_distros/foo.spec
:language: rpmspec
:caption: foo.spec
```

Packit is a service available as a GitHub app and on GitLab, but can be extended upon request.
Expand Down
21 changes: 20 additions & 1 deletion examples/5_04_distros/foo.spec
Original file line number Diff line number Diff line change
Expand Up @@ -5,11 +5,30 @@ Summary: Example package
License: Unlicense
URL: https://example.com
Source: %{pypi_source foo}
BuildRequires: python3-devel

%description
Lorem ipsum

%files
%prep
%autosetup -n foo-%{version}

%generate_buildrequires
%pyproject_buildrequires -x test

%build
%pyproject_wheel

%install
%pyproject_install
%pyproject_save_files foo

%check
%pytest

%files -f %{pyproject_files}
%license LICENSE
%doc README.md

%changelog
%autochangelog