mirror of
https://github.com/psycopg/psycopg2.git
synced 2025-01-31 09:24:07 +03:00
The Makefile can receive the pg_config location.
This commit is contained in:
parent
b25af6311c
commit
0a2856477c
14
Makefile
14
Makefile
|
@ -39,6 +39,14 @@ PACKAGE := $(BUILD_DIR)/psycopg2
|
||||||
PLATLIB := $(PACKAGE)/_psycopg.so
|
PLATLIB := $(PACKAGE)/_psycopg.so
|
||||||
PURELIB := $(patsubst lib/%,$(PACKAGE)/%,$(SOURCE_PY))
|
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/")
|
VERSION := $(shell grep PSYCOPG_VERSION setup.py | head -1 | sed -e "s/.*'\(.*\)'/\1/")
|
||||||
SDIST := dist/psycopg2-$(VERSION).tar.gz
|
SDIST := dist/psycopg2-$(VERSION).tar.gz
|
||||||
|
|
||||||
|
@ -100,14 +108,14 @@ testdb:
|
||||||
|
|
||||||
|
|
||||||
$(PLATLIB): $(SOURCE_C)
|
$(PLATLIB): $(SOURCE_C)
|
||||||
$(PYTHON) setup.py build --build-lib $(BUILD_DIR)
|
$(PYTHON) setup.py build_ext $(BUILD_EXT_OPT)
|
||||||
|
|
||||||
$(PACKAGE)/%.py: lib/%.py
|
$(PACKAGE)/%.py: lib/%.py
|
||||||
$(PYTHON) setup.py build --build-lib $(BUILD_DIR)
|
$(PYTHON) setup.py build $(BUILD_OPT)
|
||||||
|
|
||||||
|
|
||||||
$(SDIST): docs MANIFEST
|
$(SDIST): docs MANIFEST
|
||||||
$(PYTHON) setup.py sdist --formats=gztar
|
$(PYTHON) setup.py sdist $(SDIST_OPT)
|
||||||
|
|
||||||
MANIFEST: MANIFEST.in
|
MANIFEST: MANIFEST.in
|
||||||
# Run twice as MANIFEST.in includes MANIFEST
|
# Run twice as MANIFEST.in includes MANIFEST
|
||||||
|
|
Loading…
Reference in New Issue
Block a user