Skip to content

Commit

Permalink
speed up .egg-info generation on certain systems
Browse files Browse the repository at this point in the history
  • Loading branch information
ryanpetrello committed May 19, 2020
1 parent bfdd136 commit 296995e
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 1 deletion.
2 changes: 1 addition & 1 deletion Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -354,7 +354,7 @@ swagger: reports
check: flake8 pep8 # pyflakes pylint

awx-link:
python3 /awx_devel/setup.py egg_info
[ -d "/awx_devel/awx.egg-info" ] || python3 /awx_devel/setup.py egg_info_dev
cp -f /tmp/awx.egg-link /venv/awx/lib/python$(PYTHON_VERSION)/site-packages/awx.egg-link

TEST_DIRS ?= awx/main/tests/unit awx/main/tests/functional awx/conf/tests awx/sso/tests
Expand Down
12 changes: 12 additions & 0 deletions setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@
import glob
import sys
from setuptools import setup
from setuptools.command.egg_info import egg_info as _egg_info


# Paths we'll use later
Expand Down Expand Up @@ -77,6 +78,16 @@ def proc_data_files(data_files):
result.append((dir, includes))
return result


class egg_info_dev(_egg_info):
def find_sources(self):
# when we generate a .egg-info for the development
# environment, it's not really critical that we
# parse the MANIFEST.in (which is actually quite expensive
# in Docker for Mac)
pass


#####################################################################


Expand Down Expand Up @@ -143,4 +154,5 @@ def proc_data_files(data_files):
'executable': '/usr/bin/awx-python',
},
},
cmdclass={'egg_info_dev': egg_info_dev}
)

0 comments on commit 296995e

Please sign in to comment.