diff --git a/MANIFEST.in b/MANIFEST.in deleted file mode 100644 index d4acfceb..00000000 --- a/MANIFEST.in +++ /dev/null @@ -1,2 +0,0 @@ -include proto_cmd.py -include src/*.proto \ No newline at end of file diff --git a/Makefile b/Makefile index 152cd7a0..1c34a3fe 100644 --- a/Makefile +++ b/Makefile @@ -31,11 +31,12 @@ erl_test: erl_compile # Python specific build steps python_compile: @echo "==> Python (compile)" + @./proto_cmd.py build_proto @./setup.py build python_clean: @echo "==> Python (clean)" - @./setup.py clean + @./proto_cmd.py clean_proto python_release: python_compile @echo "==> Python (release)" diff --git a/proto_cmd.py b/proto_cmd.py old mode 100644 new mode 100755 index fa5e5a99..9b979e24 --- a/proto_cmd.py +++ b/proto_cmd.py @@ -1,8 +1,11 @@ +#!/usr/bin/env python + from distutils.spawn import find_executable from distutils.command.build import build from distutils.command.clean import clean from distutils.cmd import Command from distutils import log +from distutils.core import setup import sys import os @@ -86,5 +89,4 @@ def generate_proto(self, source, outputdir): if result is not None and result[1] is not 0: raise SystemError("protoc command failed: '%s'" % protoc_command.join(' ')) -# Inject our .proto compiler into the front of the build commands -build.sub_commands.insert(0, ('build_proto', None)) +setup(packages=['riak_pb'], cmdclass={'build_proto': build_proto, 'clean_proto': clean_proto}) diff --git a/setup.py b/setup.py index cf9be168..0496d033 100755 --- a/setup.py +++ b/setup.py @@ -1,7 +1,6 @@ #!/usr/bin/env python from setuptools import setup -from proto_cmd import build_proto, clean_proto setup(name='riak_pb', version='1.2.1', @@ -19,7 +18,5 @@ classifiers=['License :: OSI Approved :: Apache Software License', 'Intended Audience :: Developers', 'Operating System :: OS Independent', - 'Topic :: Database'], - cmdclass={'build_proto': build_proto, - 'clean': clean_proto} + 'Topic :: Database'] )