diff options
| author | Daniele Varrazzo <daniele.varrazzo@gmail.com> | 2010-11-14 18:23:09 +0000 |
|---|---|---|
| committer | Daniele Varrazzo <daniele.varrazzo@gmail.com> | 2010-11-14 18:23:09 +0000 |
| commit | 0a2856477c101023f262e740ab3c8c90465fe947 (patch) | |
| tree | a95788162fc5a0add6f8560a3a2d165fd6a3bcfc /Makefile | |
| parent | b25af6311c355c261593f84710d15779507308ac (diff) | |
| download | psycopg2-0a2856477c101023f262e740ab3c8c90465fe947.tar.gz | |
The Makefile can receive the pg_config location.
Diffstat (limited to 'Makefile')
| -rw-r--r-- | Makefile | 14 |
1 files changed, 11 insertions, 3 deletions
@@ -39,6 +39,14 @@ PACKAGE := $(BUILD_DIR)/psycopg2 PLATLIB := $(PACKAGE)/_psycopg.so PURELIB := $(patsubst lib/%,$(PACKAGE)/%,$(SOURCE_PY)) +BUILD_OPT := --build-lib=$(BUILD_DIR) +BUILD_EXT_OPT := --build-lib=$(BUILD_DIR) +SDIST_OPT := --formats=gztar + +ifdef PG_CONFIG + BUILD_EXT_OPT += --pg-config=$(PG_CONFIG) +endif + VERSION := $(shell grep PSYCOPG_VERSION setup.py | head -1 | sed -e "s/.*'\(.*\)'/\1/") SDIST := dist/psycopg2-$(VERSION).tar.gz @@ -100,14 +108,14 @@ testdb: $(PLATLIB): $(SOURCE_C) - $(PYTHON) setup.py build --build-lib $(BUILD_DIR) + $(PYTHON) setup.py build_ext $(BUILD_EXT_OPT) $(PACKAGE)/%.py: lib/%.py - $(PYTHON) setup.py build --build-lib $(BUILD_DIR) + $(PYTHON) setup.py build $(BUILD_OPT) $(SDIST): docs MANIFEST - $(PYTHON) setup.py sdist --formats=gztar + $(PYTHON) setup.py sdist $(SDIST_OPT) MANIFEST: MANIFEST.in # Run twice as MANIFEST.in includes MANIFEST |
