2016-11-11 15:54:13 -06:00
|
|
|
ACLOCAL_AMFLAGS = -I m4
|
|
|
|
|
2017-01-03 07:32:05 -06:00
|
|
|
if ENABLE_SERVER
|
2018-02-22 06:38:41 -06:00
|
|
|
IPASERVER_SUBDIRS = ipaserver
|
|
|
|
SERVER_SUBDIRS = daemons init install
|
2017-01-03 07:32:05 -06:00
|
|
|
endif
|
2017-02-21 14:55:21 -06:00
|
|
|
|
|
|
|
if WITH_IPATESTS
|
|
|
|
IPATESTS_SUBDIRS = ipatests
|
|
|
|
endif
|
|
|
|
|
2017-10-11 05:09:30 -05:00
|
|
|
IPACLIENT_SUBDIRS = ipaclient ipalib ipaplatform ipapython
|
2018-02-22 06:38:41 -06:00
|
|
|
PYTHON_SUBDIRS = $(IPACLIENT_SUBDIRS) $(IPATESTS_SUBDIRS) $(IPASERVER_SUBDIRS)
|
2017-10-11 05:09:30 -05:00
|
|
|
IPA_PLACEHOLDERS = freeipa ipa ipaserver ipatests
|
2018-02-22 06:38:41 -06:00
|
|
|
SUBDIRS = asn1 util client contrib po pypi $(PYTHON_SUBDIRS) $(SERVER_SUBDIRS)
|
2017-10-11 05:09:30 -05:00
|
|
|
|
|
|
|
GENERATED_PYTHON_FILES = \
|
|
|
|
$(top_builddir)/ipaplatform/override.py \
|
|
|
|
$(top_builddir)/ipapython/version.py
|
2017-01-03 07:32:05 -06:00
|
|
|
|
2016-11-09 06:34:04 -06:00
|
|
|
MOSTLYCLEANFILES = ipasetup.pyc ipasetup.pyo \
|
2016-11-09 09:16:45 -06:00
|
|
|
pylint_plugins.pyc pylint_plugins.pyo
|
2016-11-01 06:56:40 -05:00
|
|
|
|
|
|
|
# user-facing scripts
|
|
|
|
dist_bin_SCRIPTS = ipa
|
|
|
|
|
|
|
|
# files required for build but not installed
|
Remove ignore_import_errors
ignore_import_errors was added in 9b534238 to build FreeIPA ACI/API with
some dependencies missing. It turns out that the import hook doesn't
play nice with other meta importers or Cython-generated code like lxml:
./makeaci: ipaserver/plugins/dogtag.py:246: ignoring ImportError: No module named lxml.re
Traceback (most recent call last):
File "./makeaci", line 134, in <module>
main(options)
File "./makeaci", line 107, in main
api.finalize()
File "ipalib/plugable.py", line 733, in finalize
self.__do_if_not_done('load_plugins')
File "ipalib/plugable.py", line 425, in __do_if_not_done
getattr(self, name)()
File "ipalib/plugable.py", line 614, in load_plugins
self.add_package(package)
File "ipalib/plugable.py", line 641, in add_package
module = importlib.import_module(name)
File "/usr/lib64/python2.7/importlib/__init__.py", line 37, in import_module
__import__(name)
File "ipaserver/plugins/dogtag.py", line 246, in <module>
from lxml import etree
File "src/lxml/etree.pyx", line 93, in init lxml.etree
File "src/lxml/_elementpath.py", line 58, in init lxml._elementpath
AttributeError: 'FailedImport' object has no attribute 'compile'
Signed-off-by: Christian Heimes <cheimes@redhat.com>
Reviewed-By: Alexander Bokovoy <abokovoy@redhat.com>
2017-11-08 09:07:16 -06:00
|
|
|
dist_noinst_SCRIPTS = makeapi \
|
2016-11-01 06:56:40 -05:00
|
|
|
makeaci \
|
|
|
|
make-doc \
|
|
|
|
make-test \
|
|
|
|
pylint_plugins.py
|
|
|
|
|
2016-11-23 07:59:57 -06:00
|
|
|
ipasetup.py: ipasetup.py.in $(CONFIG_STATUS)
|
|
|
|
$(AM_V_GEN)sed \
|
|
|
|
-e 's|@VERSION[@]|$(VERSION)|g' \
|
|
|
|
$< > $@
|
|
|
|
|
2017-03-17 04:35:48 -05:00
|
|
|
.wheelconstraints: .wheelconstraints.in $(CONFIG_STATUS)
|
|
|
|
$(AM_V_GEN)sed \
|
|
|
|
-e 's|@VERSION[@]|$(VERSION)|g' \
|
|
|
|
$< > $@
|
|
|
|
|
2016-11-01 06:56:40 -05:00
|
|
|
EXTRA_DIST = .mailmap \
|
|
|
|
ACI.txt \
|
|
|
|
API.txt \
|
|
|
|
BUILD.txt \
|
2016-11-11 15:54:13 -06:00
|
|
|
config.rpath \
|
2017-02-28 12:04:03 -06:00
|
|
|
README.md \
|
2016-11-01 06:56:40 -05:00
|
|
|
Contributors.txt \
|
|
|
|
COPYING.openssl \
|
2016-11-03 04:34:53 -05:00
|
|
|
contrib \
|
2016-11-03 07:00:31 -05:00
|
|
|
doc \
|
2016-11-22 08:45:53 -06:00
|
|
|
freeipa.spec.in \
|
2016-11-23 07:59:57 -06:00
|
|
|
ipasetup.py.in \
|
2017-03-17 04:35:48 -05:00
|
|
|
pylintrc \
|
|
|
|
.wheelconstraints.in
|
2016-11-07 09:46:37 -06:00
|
|
|
|
2016-11-09 06:34:04 -06:00
|
|
|
clean-local:
|
|
|
|
rm -rf "$(RPMBUILD)"
|
|
|
|
rm -rf "$(top_builddir)/dist"
|
2016-11-17 09:43:17 -06:00
|
|
|
rm -rf "$(top_builddir)/.tox"
|
2016-11-09 06:34:04 -06:00
|
|
|
rm -rf "$(top_srcdir)/__pycache__"
|
2016-11-09 09:16:45 -06:00
|
|
|
rm -f "$(top_builddir)"/$(PACKAGE)-*.tar.gz
|
|
|
|
|
2016-11-09 06:34:04 -06:00
|
|
|
|
2016-11-07 09:46:37 -06:00
|
|
|
# convenience targets for RPM build
|
2016-11-09 09:16:45 -06:00
|
|
|
.PHONY: rpmroot rpmdistdir version-update _dist-version-bakein _rpms-prep \
|
2016-11-10 03:14:32 -06:00
|
|
|
rpms _rpms-body srpms _srpms-body
|
2016-11-07 09:46:37 -06:00
|
|
|
RPMBUILD ?= $(abs_builddir)/rpmbuild
|
|
|
|
TARBALL = $(PACKAGE)-$(VERSION).tar.gz
|
2016-11-22 08:45:53 -06:00
|
|
|
|
|
|
|
freeipa.spec: freeipa.spec.in $(top_builddir)/$(CONFIG_STATUS)
|
|
|
|
$(AM_V_GEN)sed \
|
|
|
|
-e 's|@VERSION[@]|$(VERSION)|g' \
|
|
|
|
-e 's|@VENDOR_SUFFIX[@]|$(VENDOR_SUFFIX)|g' \
|
|
|
|
$< > $@
|
|
|
|
|
2016-11-07 09:46:37 -06:00
|
|
|
rpmroot:
|
|
|
|
mkdir -p $(RPMBUILD)/BUILD
|
|
|
|
mkdir -p $(RPMBUILD)/RPMS
|
|
|
|
mkdir -p $(RPMBUILD)/SOURCES
|
|
|
|
mkdir -p $(RPMBUILD)/SPECS
|
|
|
|
mkdir -p $(RPMBUILD)/SRPMS
|
|
|
|
|
|
|
|
rpmdistdir:
|
|
|
|
mkdir -p $(top_builddir)/dist/rpms
|
|
|
|
mkdir -p $(top_builddir)/dist/srpms
|
|
|
|
|
2016-11-09 09:16:45 -06:00
|
|
|
# force IPA version re-generation (useful for build from Git)
|
|
|
|
version-update:
|
|
|
|
touch $(srcdir)/VERSION.m4
|
|
|
|
|
|
|
|
# convert Git snapshot version to static value usable from inside of tarball
|
|
|
|
_dist-version-bakein:
|
|
|
|
if !IS_GIT_SNAPSHOT
|
|
|
|
@echo "version-bakein target requires IPA_VERSION_IS_GIT_SNAPSHOT=yes"
|
|
|
|
exit 1
|
|
|
|
endif !IS_GIT_SNAPSHOT
|
|
|
|
chmod u+w $(top_distdir)/VERSION.m4
|
|
|
|
$(SED) -e 's/^define(IPA_VERSION_IS_GIT_SNAPSHOT,.*)/define(IPA_VERSION_IS_GIT_SNAPSHOT, no)/' -i $(top_distdir)/VERSION.m4
|
|
|
|
$(SED) -e 's/^define(IPA_VERSION_PRE_RELEASE,\(.*\))/define(IPA_VERSION_PRE_RELEASE,\1.$(GIT_VERSION))/' -i $(top_distdir)/VERSION.m4
|
|
|
|
cd $(top_distdir) && autoconf # re-generate configure from VERSION.m4
|
|
|
|
|
|
|
|
if IS_GIT_SNAPSHOT
|
|
|
|
VERSION_UPDATE_TARGET = version-update
|
|
|
|
VERSION_BAKEIN_TARGET = _dist-version-bakein
|
|
|
|
endif IS_GIT_SNAPSHOT
|
|
|
|
|
|
|
|
# HACK to support IPA_VERSION_IS_GIT_SNAPSHOT:
|
|
|
|
# touch VERSION.m4 will reexecute configure and change $(VERSION) used by dist
|
|
|
|
# but it will not change $(VERSION) in already running target rpms.
|
|
|
|
# We need to record new $(TARBALL) value used by dist for furher use
|
|
|
|
# in rpms target.
|
|
|
|
dist-hook: $(VERSION_BAKEIN_TARGET)
|
|
|
|
echo "$(TARBALL)" > $(top_builddir)/.tarball_name
|
|
|
|
echo "$(VERSION)" > $(top_builddir)/.version
|
|
|
|
|
2016-11-22 08:45:53 -06:00
|
|
|
_rpms-prep: dist-gzip rpmroot rpmdistdir freeipa.spec
|
2016-11-09 09:16:45 -06:00
|
|
|
cp $(top_builddir)/$$(cat $(top_builddir)/.tarball_name) $(RPMBUILD)/SOURCES/
|
|
|
|
rm -f $(top_builddir)/.tarball_name
|
|
|
|
|
|
|
|
rpms: $(VERSION_UPDATE_TARGET)
|
|
|
|
$(MAKE) _rpms-body
|
|
|
|
|
|
|
|
_rpms-body: _rpms-prep
|
2017-02-07 07:56:39 -06:00
|
|
|
rpmbuild --define "_topdir $(RPMBUILD)" -ba $(top_builddir)/$(PACKAGE).spec $(RPMBUILD_OPTS)
|
2016-11-09 09:16:45 -06:00
|
|
|
cp $(RPMBUILD)/RPMS/*/*$$(cat $(top_builddir)/.version)*.rpm $(top_builddir)/dist/rpms/
|
|
|
|
cp $(RPMBUILD)/SRPMS/*$$(cat $(top_builddir)/.version)*.src.rpm $(top_builddir)/dist/srpms/
|
|
|
|
rm -f rm -f $(top_builddir)/.version
|
2016-11-08 02:55:13 -06:00
|
|
|
|
2016-11-10 03:14:32 -06:00
|
|
|
srpms: $(VERSION_UPDATE_TARGET)
|
|
|
|
$(MAKE) _srpms-body
|
|
|
|
|
|
|
|
_srpms-body: _rpms-prep
|
2017-02-07 07:56:39 -06:00
|
|
|
rpmbuild --define "_topdir $(RPMBUILD)" -bs $(top_builddir)/$(PACKAGE).spec $(RPMBUILD_OPTS)
|
2016-11-10 03:14:32 -06:00
|
|
|
cp $(RPMBUILD)/SRPMS/*$$(cat $(top_builddir)/.version)*.src.rpm $(top_builddir)/dist/srpms/
|
|
|
|
rm -f rm -f $(top_builddir)/.version
|
|
|
|
|
2017-01-21 12:34:12 -06:00
|
|
|
.PHONY: lite-server
|
2017-10-11 05:09:30 -05:00
|
|
|
lite-server: $(GENERATED_PYTHON_FILES)
|
2017-01-21 12:34:12 -06:00
|
|
|
+$(MAKE) -C $(top_builddir)/install/ui
|
|
|
|
PYTHONPATH=$(top_srcdir) $(PYTHON) -bb \
|
|
|
|
contrib/lite-server.py $(LITESERVER_ARGS)
|
|
|
|
|
2016-11-08 02:55:13 -06:00
|
|
|
.PHONY: lint
|
2016-11-08 08:08:58 -06:00
|
|
|
if WITH_POLINT
|
|
|
|
POLINT_TARGET = polint
|
|
|
|
endif WITH_POLINT
|
2016-11-08 02:55:13 -06:00
|
|
|
if WITH_PYLINT
|
|
|
|
PYLINT_TARGET = pylint
|
|
|
|
endif WITH_PYLINT
|
2016-11-08 02:24:51 -06:00
|
|
|
if WITH_JSLINT
|
|
|
|
JSLINT_TARGET = jslint
|
|
|
|
endif WITH_JSLINT
|
2016-11-08 08:08:58 -06:00
|
|
|
lint: acilint apilint $(POLINT_TARGET) $(PYLINT_TARGET) $(JSLINT_TARGET)
|
2016-11-08 07:23:39 -06:00
|
|
|
|
2017-03-15 02:31:38 -05:00
|
|
|
.PHONY: devcheck
|
|
|
|
devcheck: all
|
|
|
|
if ! WITH_POLINT
|
|
|
|
@echo "ERROR: polint not available"; exit 1
|
|
|
|
endif
|
|
|
|
if ! WITH_PYLINT
|
|
|
|
@echo "ERROR: pylint not available"; exit 1
|
|
|
|
endif
|
|
|
|
if ! WITH_JSLINT
|
|
|
|
@echo "ERROR: jslint not available"; exit 1
|
|
|
|
endif
|
|
|
|
if ! WITH_PYTHON2
|
|
|
|
@echo "ERROR: python2 not available"; exit 1
|
|
|
|
endif
|
|
|
|
@ # run all linters, tests, and check with Python 2
|
2017-12-11 00:57:40 -06:00
|
|
|
PYTHONPATH=$(abspath $(top_srcdir)) $(PYTHON2) ipatests/ipa-run-tests \
|
2017-03-15 02:31:38 -05:00
|
|
|
--ipaclient-unittests
|
|
|
|
$(MAKE) $(AM_MAKEFLAGS) acilint apilint polint jslint check
|
|
|
|
$(MAKE) $(AM_MAKEFLAGS) PYTHON=$(PYTHON2) pylint
|
|
|
|
if WITH_PYTHON3
|
2018-02-14 10:00:44 -06:00
|
|
|
@ # just tests, aci, api and pylint on Python 3
|
2017-12-11 00:57:40 -06:00
|
|
|
PYTHONPATH=$(abspath $(top_srcdir)) $(PYTHON3) ipatests/ipa-run-tests \
|
2017-03-15 02:31:38 -05:00
|
|
|
--ipaclient-unittests
|
2018-02-15 03:00:07 -06:00
|
|
|
$(MAKE) $(AM_MAKEFLAGS) PYTHON=$(PYTHON3) acilint apilint polint pylint
|
2017-03-15 02:31:38 -05:00
|
|
|
else
|
|
|
|
@echo "WARNING: python3 not available"
|
|
|
|
endif
|
|
|
|
@echo "All tests passed."
|
|
|
|
|
2017-12-11 00:57:40 -06:00
|
|
|
.PHONY: fastcheck fasttest fastlint
|
|
|
|
fastcheck:
|
|
|
|
if WITH_PYTHON2
|
2018-02-14 10:00:44 -06:00
|
|
|
@$(MAKE) -j1 $(AM_MAKEFLAGS) PYTHON=$(PYTHON2) \
|
|
|
|
fastlint fasttest apilint acilint
|
2017-12-11 00:57:40 -06:00
|
|
|
endif
|
|
|
|
if WITH_PYTHON3
|
2018-02-14 10:00:44 -06:00
|
|
|
@$(MAKE) -j1 $(AM_MAKEFLAGS) PYTHON=$(PYTHON3) \
|
|
|
|
fastlint fasttest apilint acilint
|
2017-12-11 00:57:40 -06:00
|
|
|
endif
|
|
|
|
|
|
|
|
fasttest: $(GENERATED_PYTHON_FILES) ipasetup.py
|
|
|
|
@ # --ignore doubles speed of total test run compared to pytest.skip()
|
|
|
|
@ # on module.
|
|
|
|
PYTHONPATH=$(abspath $(top_srcdir)) $(PYTHON3) ipatests/ipa-run-tests \
|
|
|
|
--skip-ipaapi \
|
|
|
|
--ignore $(abspath $(top_srcdir))/ipatests/test_integration \
|
|
|
|
--ignore $(abspath $(top_srcdir))/ipatests/test_xmlrpc
|
|
|
|
|
|
|
|
fastlint: $(GENERATED_PYTHON_FILES) ipasetup.py
|
|
|
|
if ! WITH_PYLINT
|
|
|
|
@echo "ERROR: pylint not available"; exit 1
|
|
|
|
endif
|
|
|
|
@echo "Fast linting with $(PYTHON) from branch '$(GIT_BRANCH)'"
|
|
|
|
|
|
|
|
@MERGEBASE=$$(git merge-base --fork-point $(GIT_BRANCH)); \
|
2018-03-07 08:14:36 -06:00
|
|
|
FILES=$$(git diff --name-only --diff-filter=d $${MERGEBASE} \
|
2017-12-11 00:57:40 -06:00
|
|
|
| grep -E '\.py$$'); \
|
|
|
|
if [ -n "$${FILES}" ]; then \
|
2018-01-05 04:19:18 -06:00
|
|
|
echo -e "Fast linting files:\n$${FILES}\n"; \
|
2017-12-11 00:57:40 -06:00
|
|
|
echo "pycodestyle"; \
|
|
|
|
echo "-----------"; \
|
2018-02-16 10:23:23 -06:00
|
|
|
git diff -U0 $${MERGEBASE} | \
|
2018-01-05 04:19:18 -06:00
|
|
|
$(PYTHON) -m pycodestyle --diff || exit $$?; \
|
|
|
|
echo -e "\npylint"; \
|
|
|
|
echo "------"; \
|
|
|
|
PYTHONPATH=$(abspath $(top_srcdir)) $(PYTHON) -m pylint \
|
|
|
|
--rcfile=$(top_srcdir)/pylintrc \
|
|
|
|
--load-plugins pylint_plugins \
|
|
|
|
$${FILES} || exit $$?; \
|
2017-12-11 00:57:40 -06:00
|
|
|
else \
|
|
|
|
echo "No modified Python files found"; \
|
|
|
|
fi
|
|
|
|
|
|
|
|
|
2017-10-11 05:09:30 -05:00
|
|
|
.PHONY: $(top_builddir)/ipaplatform/override.py
|
|
|
|
$(top_builddir)/ipaplatform/override.py:
|
|
|
|
(cd $(top_builddir)/ipaplatform && make override.py)
|
|
|
|
|
2017-02-22 12:19:35 -06:00
|
|
|
.PHONY: $(top_builddir)/ipapython/version.py
|
|
|
|
$(top_builddir)/ipapython/version.py:
|
|
|
|
(cd $(top_builddir)/ipapython && make version.py)
|
|
|
|
|
2016-11-08 07:23:39 -06:00
|
|
|
.PHONY: acilint
|
2017-10-11 05:09:30 -05:00
|
|
|
acilint: $(GENERATED_PYTHON_FILES)
|
2018-02-14 10:00:44 -06:00
|
|
|
cd $(srcdir); $(PYTHON) ./makeaci --validate
|
2016-11-08 02:55:13 -06:00
|
|
|
|
2016-11-08 07:26:09 -06:00
|
|
|
.PHONY: apilint
|
2017-10-11 05:09:30 -05:00
|
|
|
apilint: $(GENERATED_PYTHON_FILES)
|
2018-02-14 10:00:44 -06:00
|
|
|
cd $(srcdir); $(PYTHON) ./makeapi --validate
|
2016-11-08 07:26:09 -06:00
|
|
|
|
2016-11-08 08:08:58 -06:00
|
|
|
.PHONY: polint
|
|
|
|
polint:
|
2018-02-14 10:00:44 -06:00
|
|
|
$(MAKE) -C $(srcdir)/po PYTHON=$(PYTHON) \
|
|
|
|
validate-src-strings validate-po test-gettext
|
2016-11-08 08:08:58 -06:00
|
|
|
|
2016-11-16 05:51:58 -06:00
|
|
|
# Run pylint for all python files. Finds all python files/packages, skips
|
|
|
|
# folders rpmbuild, freeipa-* and dist. Skip (match, but don't print) .*,
|
|
|
|
# *.in, *~. Finally print all python files, including scripts that do not
|
|
|
|
# have python extension.
|
2016-11-22 10:00:04 -06:00
|
|
|
|
2017-02-22 12:19:35 -06:00
|
|
|
.PHONY: pylint
|
|
|
|
|
|
|
|
if WITH_PYLINT
|
2017-10-11 05:09:30 -05:00
|
|
|
pylint: $(GENERATED_PYTHON_FILES) ipasetup.py
|
2016-11-08 02:55:13 -06:00
|
|
|
FILES=`find $(top_srcdir) \
|
|
|
|
-type d -exec test -e '{}/__init__.py' \; -print -prune -o \
|
2016-11-16 05:51:58 -06:00
|
|
|
-path './rpmbuild' -prune -o \
|
|
|
|
-path './freeipa-*' -prune -o \
|
|
|
|
-path './dist' -prune -o \
|
2017-02-23 09:19:30 -06:00
|
|
|
-path './pypi' -prune -o \
|
2016-11-17 09:43:17 -06:00
|
|
|
-path './.tox' -prune -o \
|
2016-11-16 05:51:58 -06:00
|
|
|
-name '.*' -o \
|
|
|
|
-name '*.in' -o \
|
2016-11-08 02:55:13 -06:00
|
|
|
-name '*~' -o \
|
2016-11-16 05:51:58 -06:00
|
|
|
-name '*.py' -print -o \
|
2016-11-08 02:55:13 -06:00
|
|
|
-type f -exec grep -qsm1 '^#!.*\bpython' '{}' \; -print`; \
|
2017-03-15 02:31:38 -05:00
|
|
|
echo "Pylint on $(PYTHON) is running, please wait ..."; \
|
2016-12-08 04:26:18 -06:00
|
|
|
PYTHONPATH=$(top_srcdir) $(PYTHON) -m pylint \
|
2017-02-14 02:58:44 -06:00
|
|
|
--rcfile=$(top_srcdir)/pylintrc \
|
|
|
|
--load-plugins pylint_plugins \
|
|
|
|
$${FILES}
|
2017-02-22 12:19:35 -06:00
|
|
|
endif # WITH_PYLINT
|
2016-11-08 02:24:51 -06:00
|
|
|
|
2016-11-22 09:07:32 -06:00
|
|
|
.PHONY: jslint jslint-ui jslint-ui-test jslint-html \
|
|
|
|
$(top_builddir)/install/ui/src/libs/loader.js
|
2017-02-22 12:19:35 -06:00
|
|
|
|
|
|
|
if WITH_JSLINT
|
2016-11-08 02:24:51 -06:00
|
|
|
jslint: jslint-ui jslint-ui-test jslint-html
|
|
|
|
|
2016-11-22 09:07:32 -06:00
|
|
|
$(top_builddir)/install/ui/src/libs/loader.js:
|
|
|
|
(cd $(top_builddir)/install/ui/src/libs && make loader.js)
|
|
|
|
|
2016-11-08 02:24:51 -06:00
|
|
|
# create temporary symlinks to allow jslint to find libs/loader.js
|
2016-11-22 09:07:32 -06:00
|
|
|
jslint-ui: $(top_builddir)/install/ui/src/libs/loader.js
|
2016-11-08 02:24:51 -06:00
|
|
|
cd $(top_srcdir)/install/ui; \
|
2017-08-21 04:40:33 -05:00
|
|
|
jsl -nologo -nosummary -nofilelisting -conf jsl.conf;
|
2016-11-08 02:24:51 -06:00
|
|
|
|
|
|
|
jslint-ui-test:
|
|
|
|
cd $(top_srcdir)/install/ui/test; \
|
|
|
|
jsl -nologo -nosummary -nofilelisting -conf jsl.conf
|
|
|
|
|
|
|
|
jslint-html:
|
|
|
|
cd $(top_srcdir)/install/html; \
|
|
|
|
jsl -nologo -nosummary -nofilelisting -conf jsl.conf
|
2017-02-22 12:19:35 -06:00
|
|
|
endif # WITH_JSLINT
|
2016-10-27 07:04:58 -05:00
|
|
|
|
2017-02-17 10:46:42 -06:00
|
|
|
.PHONY: bdist_wheel wheel_bundle wheel_placeholder pypi_packages
|
2016-10-27 07:04:58 -05:00
|
|
|
WHEELDISTDIR = $(top_builddir)/dist/wheels
|
2017-04-03 06:35:58 -05:00
|
|
|
WHEELPYPIDIR = $(top_builddir)/dist/pypi
|
2016-10-27 07:04:58 -05:00
|
|
|
WHEELBUNDLEDIR = $(top_builddir)/dist/bundle
|
|
|
|
|
2017-01-17 05:16:25 -06:00
|
|
|
@MK_IFEQ@ ($(IPA_SERVER_WHEELS),1)
|
|
|
|
IPA_WHEEL_PACKAGES @MK_ASSIGN@ $(IPACLIENT_SUBDIRS) ipaplatform ipaserver
|
|
|
|
IPA_OMIT_INSTALL @MK_ASSIGN@ 0
|
|
|
|
@MK_ELSE@
|
|
|
|
IPA_WHEEL_PACKAGES @MK_ASSIGN@ $(IPACLIENT_SUBDIRS)
|
|
|
|
IPA_OMIT_INSTALL @MK_ASSIGN@ 1
|
|
|
|
@MK_ENDIF@
|
|
|
|
|
|
|
|
# additional wheels for bundle, e.g. IPA_EXTRA_WHEELS="ipatests[webui] pylint"
|
|
|
|
IPA_EXTRA_WHEELS=
|
|
|
|
|
2016-10-27 07:04:58 -05:00
|
|
|
$(WHEELDISTDIR):
|
|
|
|
mkdir -p $(WHEELDISTDIR)
|
|
|
|
|
|
|
|
$(WHEELBUNDLEDIR):
|
|
|
|
mkdir -p $(WHEELBUNDLEDIR)
|
|
|
|
|
2017-04-03 06:35:58 -05:00
|
|
|
$(WHEELPYPIDIR):
|
|
|
|
mkdir -p $(WHEELPYPIDIR)
|
|
|
|
|
2016-10-27 07:04:58 -05:00
|
|
|
bdist_wheel: $(WHEELDISTDIR)
|
2017-01-17 05:16:25 -06:00
|
|
|
rm -f $(foreach item,$(IPA_WHEEL_PACKAGES) ipatests,$(WHEELDISTDIR)/$(item)-*.whl)
|
|
|
|
export IPA_OMIT_INSTALL=$(IPA_OMIT_INSTALL); \
|
|
|
|
for dir in $(IPA_WHEEL_PACKAGES) ipatests; do \
|
2016-10-27 07:04:58 -05:00
|
|
|
$(MAKE) $(AM_MAKEFLAGS) -C $${dir} $@ || exit 1; \
|
|
|
|
done
|
|
|
|
|
2017-03-17 04:35:48 -05:00
|
|
|
wheel_bundle: $(WHEELBUNDLEDIR) bdist_wheel .wheelconstraints
|
2017-01-17 05:16:25 -06:00
|
|
|
rm -f $(foreach item,$(IPA_WHEEL_PACKAGES) ipatests,$(WHEELBUNDLEDIR)/$(item)-*.whl)
|
|
|
|
@# dbus-python sometimes fails when MAKEFLAGS is set to -j2 or higher
|
|
|
|
MAKEFLAGS= $(PYTHON) -m pip wheel \
|
2017-03-17 04:35:48 -05:00
|
|
|
--disable-pip-version-check \
|
|
|
|
--constraint .wheelconstraints \
|
|
|
|
--find-links $(WHEELDISTDIR) \
|
|
|
|
--find-links $(WHEELBUNDLEDIR) \
|
|
|
|
--wheel-dir $(WHEELBUNDLEDIR) \
|
2017-04-25 06:15:02 -05:00
|
|
|
$(IPA_EXTRA_WHEELS) $(IPA_WHEEL_PACKAGES)
|
2016-11-14 03:27:15 -06:00
|
|
|
|
2017-04-03 06:35:58 -05:00
|
|
|
pypi_packages: $(WHEELPYPIDIR) .wheelconstraints
|
|
|
|
rm -f $(WHEELPYPIDIR)/*
|
|
|
|
for dir in $(IPACLIENT_SUBDIRS); do \
|
|
|
|
$(MAKE) $(AM_MAKEFLAGS) \
|
2016-11-17 09:43:17 -06:00
|
|
|
IPA_OMIT_INSTALL=1 WHEELDISTDIR="$(abspath $(WHEELPYPIDIR))" \
|
2017-04-03 06:35:58 -05:00
|
|
|
-C $${dir} bdist_wheel || exit 1; \
|
|
|
|
done
|
2017-02-17 10:46:42 -06:00
|
|
|
for dir in $(IPA_PLACEHOLDERS); do \
|
2017-04-03 06:35:58 -05:00
|
|
|
$(MAKE) $(AM_MAKEFLAGS) \
|
2016-11-17 09:43:17 -06:00
|
|
|
IPA_OMIT_INSTALL=1 WHEELDISTDIR="$(abspath $(WHEELPYPIDIR))" \
|
2017-04-03 06:35:58 -05:00
|
|
|
-C $(top_srcdir)/pypi/$${dir} bdist_wheel || exit 1; \
|
2017-02-17 10:46:42 -06:00
|
|
|
done
|
|
|
|
@echo -e "\n\nTo upload packages to PyPI, run:\n"
|
2017-04-03 06:35:58 -05:00
|
|
|
@echo -e " twine upload $(WHEELPYPIDIR)/*-$(VERSION)-py2.py3-none-any.whl\n"
|
2017-02-17 10:46:42 -06:00
|
|
|
|
2018-02-22 06:38:41 -06:00
|
|
|
.PHONY: python_install
|
|
|
|
python_install:
|
|
|
|
for dir in $(PYTHON_SUBDIRS); do \
|
|
|
|
$(MAKE) $(AM_MAKEFLAGS) -C $${dir} install || exit 1; \
|
|
|
|
done
|
|
|
|
|
2016-11-14 03:27:15 -06:00
|
|
|
.PHONY:
|
|
|
|
strip-po:
|
|
|
|
$(MAKE) -C po strip-po
|