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

Allow packaging with bdist_egg #204

Open
wants to merge 1 commit 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
11 changes: 10 additions & 1 deletion setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@
import pkg_resources
from distutils.command.build import build as _build
from distutils.command.clean import clean as _clean
from distutils.command.install_lib import install_lib as _install_lib
from distutils.dir_util import remove_tree
from glob import glob

Expand Down Expand Up @@ -134,6 +135,13 @@ def run(self):
_ensure_proto(self)
_install.run(self)


class install_lib(_install_lib):
def run(self):
_ensure_java(self)
_ensure_proto(self)
_install_lib.run(self)


class develop(_develop):
user_options = list(_develop.user_options)
Expand Down Expand Up @@ -162,7 +170,7 @@ def run(self):
_clean.run(self)


is_build_step = bool({'build', 'install', 'develop',
is_build_step = bool({'build', 'install', 'develop', 'bdist_egg',
'bdist_wheel'}.intersection(sys.argv))
protos_built = bool(_compiled_protos()) and 'clean' not in sys.argv

Expand All @@ -184,6 +192,7 @@ def run(self):
cmdclass.update({'build_java': build_java, # directly build the java source
'build_proto': build_proto, # directly build the proto source
'build': build, # bdist_wheel or pip install .
'install_lib': install_lib, # bdist_egg
'install': install, # python setup.py install
'develop': develop, # python setup.py develop
'clean': clean}) # extra cleanup
Expand Down