mirror of
https://github.com/ansible-collections/community.general.git
synced 2025-05-20 07:59:10 -07:00
Move setup.py stuff back to top level as "make sdist" was not working, plus, it makes sources cleaner.
This commit is contained in:
parent
a8d748220b
commit
f72114c657
4 changed files with 12 additions and 12 deletions
18
Makefile
18
Makefile
|
@ -16,11 +16,6 @@ RPMVERSION := $(shell awk '/Version/{print $$2; exit}' < $(RPMSPEC) | cut -d "%"
|
||||||
RPMRELEASE := $(shell awk '/Release/{print $$2; exit}' < $(RPMSPEC) | cut -d "%" -f1)
|
RPMRELEASE := $(shell awk '/Release/{print $$2; exit}' < $(RPMSPEC) | cut -d "%" -f1)
|
||||||
RPMDIST = $(shell rpm --eval '%dist')
|
RPMDIST = $(shell rpm --eval '%dist')
|
||||||
RPMNVR = "$(NAME)-$(RPMVERSION)-$(RPMRELEASE)$(RPMDIST)"
|
RPMNVR = "$(NAME)-$(RPMVERSION)-$(RPMRELEASE)$(RPMDIST)"
|
||||||
# Python distutils options
|
|
||||||
DUDIR = packaging/distutils
|
|
||||||
DUSETUP = $(DUDIR)/setup.py
|
|
||||||
DUMANIFEST = $(DUDIR)/MANIFEST.in
|
|
||||||
|
|
||||||
|
|
||||||
all: clean python
|
all: clean python
|
||||||
|
|
||||||
|
@ -70,15 +65,15 @@ clean:
|
||||||
rm -rf MANIFEST rpm-build
|
rm -rf MANIFEST rpm-build
|
||||||
|
|
||||||
python:
|
python:
|
||||||
python $(DUSETUP) build
|
python setup.py build
|
||||||
|
|
||||||
install:
|
install:
|
||||||
mkdir -p /usr/share/ansible
|
mkdir -p /usr/share/ansible
|
||||||
cp ./library/* /usr/share/ansible/
|
cp ./library/* /usr/share/ansible/
|
||||||
python $(DUSETUP) install
|
python setup.py install
|
||||||
|
|
||||||
sdist: clean
|
sdist: clean
|
||||||
python ./$(DUSETUP) sdist -t $(DUMANIFEST)
|
python setup.py sdist -t MANIFEST.in
|
||||||
|
|
||||||
rpmcommon: sdist
|
rpmcommon: sdist
|
||||||
@mkdir -p rpm-build
|
@mkdir -p rpm-build
|
||||||
|
@ -109,3 +104,10 @@ rpm: rpmcommon
|
||||||
@echo "Ansible RPM is built:"
|
@echo "Ansible RPM is built:"
|
||||||
@echo " rpm-build/noarch/$(RPMNVR).noarch.rpm"
|
@echo " rpm-build/noarch/$(RPMNVR).noarch.rpm"
|
||||||
@echo "#############################################"
|
@echo "#############################################"
|
||||||
|
|
||||||
|
debian:
|
||||||
|
# stub target, FIXME!
|
||||||
|
(cd packaging/debian; dpkg-buildpackage -us -uc -rfakeroot)
|
||||||
|
|
||||||
|
# for arch or gentoo, read instructions in the appropriate 'packaging' subdirectory directory
|
||||||
|
|
||||||
|
|
|
@ -2,8 +2,6 @@
|
||||||
%{!?python_sitelib: %global python_sitelib %(%{__python} -c "from distutils.sysconfig import get_python_lib; print(get_python_lib())")}
|
%{!?python_sitelib: %global python_sitelib %(%{__python} -c "from distutils.sysconfig import get_python_lib; print(get_python_lib())")}
|
||||||
BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-buildroot
|
BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-buildroot
|
||||||
%endif
|
%endif
|
||||||
%define _dusetup packaging/distutils/setup.py
|
|
||||||
|
|
||||||
|
|
||||||
Name: ansible
|
Name: ansible
|
||||||
Release: 1%{?dist}
|
Release: 1%{?dist}
|
||||||
|
@ -35,10 +33,10 @@ are transferred to managed machines automatically.
|
||||||
%setup -q
|
%setup -q
|
||||||
|
|
||||||
%build
|
%build
|
||||||
%{__python} %{_dusetup} build
|
%{__python} setup.py build
|
||||||
|
|
||||||
%install
|
%install
|
||||||
%{__python} %{_dusetup} install -O1 --root=$RPM_BUILD_ROOT
|
%{__python} setup.py install -O1 --root=$RPM_BUILD_ROOT
|
||||||
mkdir -p $RPM_BUILD_ROOT/etc/ansible/
|
mkdir -p $RPM_BUILD_ROOT/etc/ansible/
|
||||||
cp examples/hosts $RPM_BUILD_ROOT/etc/ansible/
|
cp examples/hosts $RPM_BUILD_ROOT/etc/ansible/
|
||||||
mkdir -p $RPM_BUILD_ROOT/%{_mandir}/man1/
|
mkdir -p $RPM_BUILD_ROOT/%{_mandir}/man1/
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue