Files
autospec/setup.py
Kevron Rees 85af003498 Try to autodetect python version by classifiers
If a python package is python3-only and has a setup.py,
"distutils23" will be used as build pattern even if the project is
explicitely specified as python 2 or python 3 only.

This change tries to find if either of these are the case by
looking at the classifiers in the setup.py file for the following
string:

"Programming Language :: Python :: 3 :: Only"
"Programming Language :: Python :: 2 :: Only"

The default is still "distutils23" unless either of these strings
are found.  If they are "distutils2" or "distutils3" will be used
corresponding to the version in the classifier.

Signed-off-by: Kevron Rees <kevron.m.rees@intel.com>
2018-03-21 09:28:58 -07:00

34 lines
1.1 KiB
Python

from setuptools import setup, find_packages
import sys, os
version = "1.2.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 :: Only',
'Programming Language :: Python :: 3',
'Programming Language :: Python :: 3.2',
'Programming Language :: Python :: 3.3',
'Programming Language :: Python :: 3.4',
'Programming Language :: Python :: 3.5',
'Programming Language :: Python :: 3.6',
],
include_package_data = True,
)