Skip to content
Open
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: 38 additions & 0 deletions alibuild.spec
Original file line number Diff line number Diff line change
@@ -0,0 +1,38 @@
Name: python-alibuild
Version: %{?version}%{!?version:0}
Release: 1%{?dist}
Summary: ALICE Build Tool
License: GPL-3.0-or-later
URL: https://github.com/alisw/alibuild
Source0: alibuild-%{version}-py3-none-any.whl

BuildArch: noarch
BuildRequires: python3-devel
BuildRequires: python3-pip

%global _description %{expand:
ALICE Build Tool for building HEP software.}

%description %_description

%package -n python3-alibuild
Summary: %{summary}

%description -n python3-alibuild %_description

%prep
%build

%install
%{python3} -m pip install --root %{buildroot} --prefix %{_prefix} --no-deps --no-index %{SOURCE0}

%files -n python3-alibuild
%{python3_sitelib}/alibuild_helpers/
%{python3_sitelib}/alibuild-*.dist-info/
%{_bindir}/aliBuild
%{_bindir}/alienv
%{_bindir}/aliDoctor
%{_bindir}/aliDeps
%{_bindir}/pb

%changelog
23 changes: 23 additions & 0 deletions build-rpm.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
#!/bin/bash
set -e

VERSION=${1:?Usage: $0 <version>}
SPEC=alibuild.spec

BUILDDIR=$(mktemp -d)
trap 'rm -rf "$BUILDDIR"' EXIT

echo "Downloading alibuild ${VERSION} wheel from PyPI..."

# Download wheel to SOURCES
mkdir -p "$BUILDDIR/SOURCES"
pip download --no-deps --only-binary=:all: --dest "$BUILDDIR/SOURCES" "alibuild==${VERSION}"

# Build RPM
rpmbuild -ba "${SPEC}" \
--define "version ${VERSION}" \
--define "_topdir ${BUILDDIR}"

# Copy RPMs to current directory
cp "$BUILDDIR/RPMS"/*/*.rpm "$BUILDDIR/SRPMS"/*.rpm .
echo "Done. RPMs copied to current directory."
2 changes: 1 addition & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,7 @@ alibuild_helpers = ['build_template.sh']

[tool.setuptools.packages.find]
where = ["."]
exclude = ["yaml"]
exclude = ["debian", "docs", "docs.*", "templates", "tests", "tests.*"]

[tool.setuptools.dynamic]
readme = {file = ["README.rst"]}