mirror of
https://github.com/ansible-collections/community.general.git
synced 2025-10-21 19:43:59 -07:00
Move packaging related things out of the root directory:
Distutils MANIFEST.in, setup.py -> packaging/distutils/ directory.
This commit is contained in:
parent
4578b17213
commit
516df5f64f
4 changed files with 13 additions and 5 deletions
6
packaging/distutils/MANIFEST.in
Normal file
6
packaging/distutils/MANIFEST.in
Normal file
|
@ -0,0 +1,6 @@
|
|||
include README.md packaging/rpm/ansible.spec
|
||||
include examples/hosts
|
||||
include packaging/distutils/setup.py
|
||||
recursive-include docs *
|
||||
recursive-include library *
|
||||
include Makefile
|
30
packaging/distutils/setup.py
Normal file
30
packaging/distutils/setup.py
Normal file
|
@ -0,0 +1,30 @@
|
|||
#!/usr/bin/env python
|
||||
|
||||
# NOTE: setup.py does NOT install the contents of the library dir
|
||||
# for you, you should go through "make install" or "make RPMs"
|
||||
# for that, or manually copy modules over.
|
||||
|
||||
import glob
|
||||
import os
|
||||
import sys
|
||||
|
||||
sys.path.insert(0, os.path.abspath('lib'))
|
||||
from ansible import __version__, __author__
|
||||
from distutils.core import setup
|
||||
|
||||
setup(name='ansible',
|
||||
version=__version__,
|
||||
description='Minimal SSH command and control',
|
||||
author=__author__,
|
||||
author_email='michael.dehaan@gmail.com',
|
||||
url='http://ansible.github.com/',
|
||||
license='GPLv3',
|
||||
package_dir = { 'ansible' : 'lib/ansible' },
|
||||
packages=[
|
||||
'ansible',
|
||||
],
|
||||
scripts=[
|
||||
'bin/ansible',
|
||||
'bin/ansible-playbook'
|
||||
]
|
||||
)
|
|
@ -2,6 +2,8 @@
|
|||
%{!?python_sitelib: %global python_sitelib %(%{__python} -c "from distutils.sysconfig import get_python_lib; print(get_python_lib())")}
|
||||
BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-buildroot
|
||||
%endif
|
||||
%define _dusetup packaging/distutils/setup.py
|
||||
|
||||
|
||||
Name: ansible
|
||||
Release: 1%{?dist}
|
||||
|
@ -33,10 +35,10 @@ are transferred to managed machines automatically.
|
|||
%setup -q
|
||||
|
||||
%build
|
||||
%{__python} setup.py build
|
||||
%{__python} %{_dusetup} build
|
||||
|
||||
%install
|
||||
%{__python} setup.py install -O1 --root=$RPM_BUILD_ROOT
|
||||
%{__python} %{_dusetup} install -O1 --root=$RPM_BUILD_ROOT
|
||||
mkdir -p $RPM_BUILD_ROOT/etc/ansible/
|
||||
cp examples/hosts $RPM_BUILD_ROOT/etc/ansible/
|
||||
mkdir -p $RPM_BUILD_ROOT/%{_mandir}/man1/
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue