Skip to content

Commit

Permalink
Update packaging for RH9
Browse files Browse the repository at this point in the history
  • Loading branch information
df7cb committed Oct 11, 2024
1 parent 4f59a97 commit 3cf71c9
Show file tree
Hide file tree
Showing 3 changed files with 13 additions and 11 deletions.
2 changes: 1 addition & 1 deletion LICENSE
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
MIT License

Copyright (c) 2019 Cybertec Schönig & Schönig GmbH
Copyright (c) 2019, 2024 CYBERTEC PostgreSQL International GmbH

Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
Expand Down
Original file line number Diff line number Diff line change
@@ -1,23 +1,23 @@
%define VERSION 1.2
%define VERSION 1.3

%define ENVNAME patroni-infoblox-integration
%define INSTALLPATH /opt/app/patroni-infoblox-integration
%define debug_package %{nil}
# remove build-id files that conflict with system python
%define _build_id_links none

# Fetch remote sources
%undefine _disable_source_fetch

Name: patroni-infoblox-integration
Version: %{VERSION}
Release: 1.rhel7
Release: 1%{dist}
License: MIT
Summary: PostgreSQL high-availability manager
Source: %{name}-%{version}.tar.gz
Source: https://github.com/cybertec-postgresql/patroni-infoblox-integration/archive/refs/tags/%{version}.tar.gz
BuildRoot: %{_tmppath}/%{buildprefix}-buildroot
Requires: python3

#%global __requires_exclude_from ^%{INSTALLPATH}/lib/python3.6/site-packages/(psycopg2/|_cffi_backend.so|_cffi_backend.cpython-36m-x86_64-linux-gnu.so|.libs_cffi_backend/libffi-.*.so.6.0.4)
#%global __provides_exclude_from ^%{INSTALLPATH}/lib/python3.6/
BuildRequires: python3-virtualenv

%global __python %{__python3}

Expand All @@ -31,11 +31,13 @@ Packaged version of Patroni HA manager.

%install
mkdir -p $RPM_BUILD_ROOT%{INSTALLPATH}
virtualenv-3 --distribute --system-site-packages $RPM_BUILD_ROOT%{INSTALLPATH}
virtualenv --system-site-packages $RPM_BUILD_ROOT%{INSTALLPATH}
$RPM_BUILD_ROOT%{INSTALLPATH}/bin/pip3 install .

virtualenv-3.6 --relocatable $RPM_BUILD_ROOT%{INSTALLPATH}
sed -i "s#$RPM_BUILD_ROOT##" $RPM_BUILD_ROOT%{INSTALLPATH}/bin/activate*
# remove pycache files that reference the build root
find $RPM_BUILD_ROOT -name __pycache__ | xargs -r rm -rf
# fix references to build root in shell scripts
sed -i "s#$RPM_BUILD_ROOT##" $RPM_BUILD_ROOT%{INSTALLPATH}/bin/*

%clean
rm -rf $RPM_BUILD_ROOT
Expand Down
2 changes: 1 addition & 1 deletion setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
from setuptools import setup

setup(name='patroni-infoblox-integration',
version='1.2',
version='1.3',
description='Helper tools for maintaining ',
author='Ants Aasma',
author_email='[email protected]',
Expand Down

0 comments on commit 3cf71c9

Please sign in to comment.