Commit b7716ff1 authored by Mark Schouten's avatar Mark Schouten

Improve setup.py, we NEED python3

parent daf9e3b2
#!/usr/bin/env python
from distutils.core import setup
import os, sys
from setuptools import setup, find_packages
try:
from distutils.command.build_py import build_py_2to3 as build_py
except ImportError:
from distutils.command.build_py import build_py
major, minor = sys.version_info[:2] # Python version
if major < 3:
print("We need at least python 3")
sys.exit(1)
elif major == 3:
PYTHON3 = True
try:
import lib2to3 # Just a check--the module is not actually used
except ImportError:
print("Python 3.X support requires the 2to3 tool.")
sys.exit(1)
setup(
name='ypconfig',
......@@ -10,7 +28,7 @@ setup(
author_email='mark@tuxis.nl',
url='https://gitlab.tuxis.nl/mark/ypconfig',
license='Closed',
py_modules=['ypconfig.Config', 'ypconfig.Netlink'],
packages=find_packages('lib'),
package_dir={'': 'lib'},
platforms=['linux'],
data_files=[
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment