diff options
-rw-r--r-- | Makefile.am | 8 | ||||
-rw-r--r-- | Makefile.python.am | 15 | ||||
-rw-r--r-- | configure.ac | 1 |
3 files changed, 17 insertions, 7 deletions
diff --git a/Makefile.am b/Makefile.am index 56521e4e8..f9922bbdb 100644 --- a/Makefile.am +++ b/Makefile.am @@ -21,6 +21,11 @@ dist_noinst_SCRIPTS = ignore_import_errors.py \ make-test \ pylint_plugins.py +ipasetup.py: ipasetup.py.in $(CONFIG_STATUS) + $(AM_V_GEN)sed \ + -e 's|@VERSION[@]|$(VERSION)|g' \ + $< > $@ + EXTRA_DIST = .mailmap \ ACI.txt \ API.txt \ @@ -31,6 +36,7 @@ EXTRA_DIST = .mailmap \ contrib \ doc \ freeipa.spec.in \ + ipasetup.py.in \ pylintrc \ pytest.ini @@ -146,7 +152,7 @@ polint: $(top_builddir)/ipapython/version.py: (cd $(top_builddir)/ipapython && make version.py) -pylint: $(top_builddir)/ipapython/version.py +pylint: $(top_builddir)/ipapython/version.py ipasetup.py FILES=`find $(top_srcdir) \ -type d -exec test -e '{}/__init__.py' \; -print -prune -o \ -path './rpmbuild' -prune -o \ diff --git a/Makefile.python.am b/Makefile.python.am index 2d6285348..665893f43 100644 --- a/Makefile.python.am +++ b/Makefile.python.am @@ -7,13 +7,18 @@ else VERBOSITY="--quiet" endif !VERBOSE_MAKE -all-local: +# hack to handle back-in-the-hierarchy depedency on ipasetup.py +.PHONY: $(top_builddir)/ipasetup.py +$(top_builddir)/ipasetup.py: + (cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) ipasetup.py) + +all-local: $(top_builddir)/ipasetup.py cd $(srcdir); $(PYTHON) setup.py \ $(VERBOSITY) \ build \ --build-base "$(abs_builddir)/build" -install-exec-local: +install-exec-local: $(top_builddir)/ipasetup.py $(PYTHON) $(srcdir)/setup.py \ $(VERBOSITY) \ install \ @@ -26,7 +31,7 @@ uninstall-local: cat "$(DESTDIR)$(pkgpythondir)/install_files.txt" | xargs rm -rf rm -rf "$(DESTDIR)$(pkgpythondir)" -clean-local: +clean-local: $(top_builddir)/ipasetup.py $(PYTHON) "$(srcdir)/setup.py" clean --all rm -rf "$(srcdir)/build" "$(srcdir)/dist" "$(srcdir)/MANIFEST" find "$(srcdir)" \ @@ -36,7 +41,7 @@ clean-local: # take list of all Python source files and copy them into distdir # SOURCES.txt does not contain directories so we need to create those -dist-hook: +dist-hook: $(top_builddir)/ipasetup.py $(PYTHON) "$(srcdir)/setup.py" egg_info PYTHON_SOURCES=$$(cat "$(srcdir)/$(pkgname).egg-info/SOURCES.txt") || exit $$?; \ for FILEN in $${PYTHON_SOURCES}; \ @@ -47,6 +52,6 @@ dist-hook: WHEELDISTDIR = $(top_builddir)/dist/wheels .PHONY: bdist_wheel -bdist_wheel: +bdist_wheel: $(top_builddir)/ipasetup.py rm -rf $(WHEELDISTDIR)/$(pkgname)*.whl $(PYTHON) "$(srcdir)/setup.py" bdist_wheel --dist-dir=$(WHEELDISTDIR) diff --git a/configure.ac b/configure.ac index bcc62817a..66e6e9bd0 100644 --- a/configure.ac +++ b/configure.ac @@ -540,7 +540,6 @@ AC_CONFIG_FILES([ ipaplatform/Makefile ipapython/Makefile ipaserver/Makefile - ipasetup.py ipatests/Makefile ipatests/man/Makefile po/Makefile.in |