forked from freeipa/freeipa
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Build: Makefiles for Python packages
This version builds only one version of Python packages. If you want to build for Python 2 & 3 call configure twice using different --with-python or specify PYTHON variable when calling make. dist-hook is using SOURCES.txt file from egg-info. According to Petr Viktorin this should be enough for our purposes and avoids need to create plugins for setuptools. Currently VPATH builds do not work for various reasons. This should be fixed later on. Most credit goes to these guys: Christian Heimes <[email protected]> Petr Viktorin <[email protected]> Kevin Brown <[email protected]> https://fedorahosted.org/freeipa/ticket/6418 Reviewed-By: Martin Basti <[email protected]> Reviewed-By: Christian Heimes <[email protected]>
- Loading branch information
Showing
13 changed files
with
57 additions
and
66 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,38 @@ | ||
pkgname = $(shell basename "$(abs_srcdir)") | ||
pkgpythondir = $(pythondir)/$(pkgname) | ||
|
||
all-local: | ||
cd $(srcdir); $(PYTHON) setup.py build \ | ||
--build-base "$(abs_builddir)/build" \ | ||
--verbose | ||
|
||
install-exec-local: | ||
$(PYTHON) $(srcdir)/setup.py install \ | ||
--prefix "$(DESTDIR)$(prefix)" \ | ||
--single-version-externally-managed \ | ||
--record "$(DESTDIR)$(pkgpythondir)/install_files.txt" \ | ||
--optimize 1 \ | ||
--verbose | ||
|
||
uninstall-local: | ||
cat "$(DESTDIR)$(pkgpythondir)/install_files.txt" | xargs rm -rf | ||
rm -rf "$(DESTDIR)$(pkgpythondir)" | ||
|
||
clean-local: | ||
$(PYTHON) "$(srcdir)/setup.py" clean --all | ||
rm -rf "$(srcdir)/build" "$(srcdir)/dist" "$(srcdir)/MANIFEST" | ||
find "$(srcdir)" \ | ||
-name "*.py[co]" -delete -o \ | ||
-name "__pycache__" -delete -o \ | ||
-name "*.egg-info" -exec rm -rf {} + | ||
|
||
# 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: | ||
$(PYTHON) "$(srcdir)/setup.py" egg_info | ||
PYTHON_SOURCES=$$(cat "$(srcdir)/$(pkgname).egg-info/SOURCES.txt") || exit $$?; \ | ||
for FILEN in $${PYTHON_SOURCES}; \ | ||
do \ | ||
if test -x "$(srcdir)/$${FILEN}"; then MODE=755; else MODE=644; fi; \ | ||
$(INSTALL) -D -m $${MODE} "$(srcdir)/$${FILEN}" "$(distdir)/$${FILEN}" || exit $$?; \ | ||
done |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
include $(top_srcdir)/Makefile.python.am |
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
include $(top_srcdir)/Makefile.python.am |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
include $(top_srcdir)/Makefile.python.am |
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
include $(top_srcdir)/Makefile.python.am |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
include $(top_srcdir)/Makefile.python.am |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
SUBDIRS = man | ||
|
||
include $(top_srcdir)/Makefile.python.am |