mirror of
https://github.com/clearlinux/autospec.git
synced 2026-04-28 11:03:56 +00:00
Add support for python packaging.
Added a setup.py for packaging. This will install the .py files as autospec library in dist-packages. Because of the way the imports are currently done, autospec.py is installed in dist-packages dir. The rpm packaging should create a symlink to this file at /usr/bin/autospec.py
This commit is contained in:
2
MANIFEST.in
Normal file
2
MANIFEST.in
Normal file
@@ -0,0 +1,2 @@
|
||||
include README.rst
|
||||
include LICENSE
|
||||
6
autospec/__init__.py
Normal file
6
autospec/__init__.py
Normal file
@@ -0,0 +1,6 @@
|
||||
import sys
|
||||
import os
|
||||
|
||||
__all__ = ["buildreq", "build", "buildpattern", "config", "docs","files",
|
||||
"git","lang", "license", "patches", "specdescription", "tarball",
|
||||
"util", "commitmessage", "test", "patches"]
|
||||
@@ -17,6 +17,11 @@
|
||||
# along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
|
||||
import argparse
|
||||
import sys
|
||||
import os
|
||||
import re
|
||||
import types
|
||||
|
||||
import build
|
||||
import buildpattern
|
||||
import buildreq
|
||||
@@ -26,14 +31,10 @@ import git
|
||||
import lang
|
||||
import license
|
||||
import docs
|
||||
import os
|
||||
import patches
|
||||
import re
|
||||
import specdescription
|
||||
import sys
|
||||
import tarball
|
||||
import test
|
||||
import types
|
||||
import commitmessage
|
||||
|
||||
from tarball import name
|
||||
@@ -41,7 +42,6 @@ from util import _file_write
|
||||
|
||||
sys.path.append(os.path.dirname(__file__))
|
||||
|
||||
|
||||
def write_sources(file):
|
||||
"""Append additonal source files.
|
||||
systemd unit files, gcov and additional source tarballs
|
||||
30
setup.py
Normal file
30
setup.py
Normal file
@@ -0,0 +1,30 @@
|
||||
from setuptools import setup, find_packages
|
||||
|
||||
import sys, os
|
||||
version = "1.0.0"
|
||||
|
||||
def readme():
|
||||
with open("README.rst") as f:
|
||||
return f.read()
|
||||
|
||||
setup(name="autospec",
|
||||
description="Automated creation of RPM packaging",
|
||||
long_description=readme(),
|
||||
version = version,
|
||||
license = "GPLv3",
|
||||
packages = ["autospec"],
|
||||
package_data = {
|
||||
'': ['*.pl', '*.dic'],
|
||||
},
|
||||
classifiers=[
|
||||
'Intended Audience :: Developers',
|
||||
'Topic :: Software Development :: Build Tools',
|
||||
'License :: OSI Approved :: GNU General Public License v3 (GPLv3)',
|
||||
# Python versions supported.
|
||||
'Programming Language :: Python :: 3',
|
||||
'Programming Language :: Python :: 3.2',
|
||||
'Programming Language :: Python :: 3.3',
|
||||
'Programming Language :: Python :: 3.4',
|
||||
],
|
||||
include_package_data = True,
|
||||
)
|
||||
Reference in New Issue
Block a user