Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Move away from distutils #53

Open
wants to merge 2 commits into
base: master
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
36 changes: 7 additions & 29 deletions setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -9,32 +9,13 @@
#-

import sys
import distutils.core
from distutils.command.build import \
build as std_build
import setuptools

class my_build(std_build) :
"customization of build to perform additional validation."
if sys.version_info < (3, 5):
sys.stderr.write("This module requires Python 3.5 or later.\n")
sys.exit(-1)

def run(self) :
try :
exec \
(
"async def dummy() :\n"
" pass\n"
"#end dummy\n"
)
except SyntaxError :
sys.stderr.write("This module requires Python 3.5 or later.\n")
sys.exit(-1)
#end try
super().run()
#end run

#end my_build

distutils.core.setup \
(
setuptools.setup(
name = "DBussy",
version = "1.3",
description = "language bindings for libdbus, for Python 3.5 or later",
Expand All @@ -43,9 +24,6 @@ def run(self) :
author_email = "[email protected]",
url = "https://github.com/ldo/dbussy",
license = "LGPL v2.1+",
python_requires='>=3.5',
py_modules = ["dbussy", "ravel"],
cmdclass =
{
"build" : my_build,
},
)
)