Remove virtualenv stuff from Makefiles #60
This commit is contained in:
parent
7b98415da3
commit
0acae8240f
6
Makefile
6
Makefile
@ -11,7 +11,6 @@ PYP_DIR = src/py
|
|||||||
# Generate and install developmet versions of the extension
|
# Generate and install developmet versions of the extension
|
||||||
# and python package.
|
# and python package.
|
||||||
# The extension is named 'dev' with a 'current' alias for easily upgrading.
|
# The extension is named 'dev' with a 'current' alias for easily upgrading.
|
||||||
# The Python package is installed in a virtual environment envs/dev/
|
|
||||||
# Requires sudo.
|
# Requires sudo.
|
||||||
install: ## Generate and install development version of the extension; requires sudo.
|
install: ## Generate and install development version of the extension; requires sudo.
|
||||||
$(MAKE) -C $(PYP_DIR) install
|
$(MAKE) -C $(PYP_DIR) install
|
||||||
@ -29,7 +28,6 @@ release: ## Generate a new release of the extension. Only for telease manager
|
|||||||
$(MAKE) -C $(PYP_DIR) release
|
$(MAKE) -C $(PYP_DIR) release
|
||||||
|
|
||||||
# Install the current release.
|
# Install the current release.
|
||||||
# The Python package is installed in a virtual environment envs/X.Y.Z/
|
|
||||||
# Requires sudo.
|
# Requires sudo.
|
||||||
# Use the RELEASE_VERSION environment variable to deploy a specific version:
|
# Use the RELEASE_VERSION environment variable to deploy a specific version:
|
||||||
# sudo make deploy RELEASE_VERSION=1.0.0
|
# sudo make deploy RELEASE_VERSION=1.0.0
|
||||||
@ -52,10 +50,6 @@ clean-release: ## clean up current release
|
|||||||
rm -rf release/python/$(RELEASE_VERSION)
|
rm -rf release/python/$(RELEASE_VERSION)
|
||||||
rm -f release/$(RELEASE_VERSION)--*.sql
|
rm -f release/$(RELEASE_VERSION)--*.sql
|
||||||
|
|
||||||
# Cleanup all virtual environments
|
|
||||||
clean-environments: ## clean up all virtual environments
|
|
||||||
rm -rf envs/*
|
|
||||||
|
|
||||||
clean-all: clean-dev clean-release clean-environments
|
clean-all: clean-dev clean-release clean-environments
|
||||||
|
|
||||||
help:
|
help:
|
||||||
|
@ -7,7 +7,6 @@ include ../../Makefile.global
|
|||||||
# requires sudo. In additionof the current development version
|
# requires sudo. In additionof the current development version
|
||||||
# named 'dev', an alias 'current' is generating for ease of
|
# named 'dev', an alias 'current' is generating for ease of
|
||||||
# update (upgrade to 'current', then to 'dev').
|
# update (upgrade to 'current', then to 'dev').
|
||||||
# the python module is installed in a virtualenv in envs/dev/
|
|
||||||
# * test runs the tests for the currently generated Development
|
# * test runs the tests for the currently generated Development
|
||||||
# extension.
|
# extension.
|
||||||
|
|
||||||
@ -18,11 +17,8 @@ DATA = $(EXTENSION)--dev.sql \
|
|||||||
SOURCES_DATA_DIR = sql
|
SOURCES_DATA_DIR = sql
|
||||||
SOURCES_DATA = $(wildcard $(SOURCES_DATA_DIR)/*.sql)
|
SOURCES_DATA = $(wildcard $(SOURCES_DATA_DIR)/*.sql)
|
||||||
|
|
||||||
VIRTUALENV_PATH = $(realpath ../../envs)
|
|
||||||
ESC_VIRVIRTUALENV_PATH = $(subst /,\/,$(VIRTUALENV_PATH))
|
|
||||||
|
|
||||||
REPLACEMENTS = -e 's/@@VERSION@@/$(EXTVERSION)/g' \
|
REPLACEMENTS = -e 's/@@VERSION@@/$(EXTVERSION)/g'
|
||||||
-e 's/@@VIRTUALENV_PATH@@/$(ESC_VIRVIRTUALENV_PATH)/g'
|
|
||||||
|
|
||||||
$(DATA): $(SOURCES_DATA)
|
$(DATA): $(SOURCES_DATA)
|
||||||
$(SED) $(REPLACEMENTS) $(SOURCES_DATA_DIR)/*.sql > $@
|
$(SED) $(REPLACEMENTS) $(SOURCES_DATA_DIR)/*.sql > $@
|
||||||
@ -54,7 +50,6 @@ release: ../../release/$(EXTENSION).control $(SOURCES_DATA)
|
|||||||
$(SED) $(REPLACEMENTS) $(SOURCES_DATA_DIR)/*.sql > ../../release/$(EXTENSION)--$(EXTVERSION).sql
|
$(SED) $(REPLACEMENTS) $(SOURCES_DATA_DIR)/*.sql > ../../release/$(EXTENSION)--$(EXTVERSION).sql
|
||||||
|
|
||||||
# Install the current relese into the PostgreSQL extensions directory
|
# Install the current relese into the PostgreSQL extensions directory
|
||||||
# and the Python package in a virtual environment envs/X.Y.Z
|
|
||||||
deploy:
|
deploy:
|
||||||
$(INSTALL_DATA) ../../release/$(EXTENSION).control '$(DESTDIR)$(datadir)/extension/'
|
$(INSTALL_DATA) ../../release/$(EXTENSION).control '$(DESTDIR)$(datadir)/extension/'
|
||||||
$(INSTALL_DATA) ../../release/*.sql '$(DESTDIR)$(datadir)/extension/'
|
$(INSTALL_DATA) ../../release/*.sql '$(DESTDIR)$(datadir)/extension/'
|
||||||
|
@ -2,14 +2,11 @@ include ../../Makefile.global
|
|||||||
|
|
||||||
# Install the package locally for development
|
# Install the package locally for development
|
||||||
install:
|
install:
|
||||||
virtualenv --system-site-packages ../../envs/dev
|
pip install ./crankshaft
|
||||||
# source ../../envs/dev/bin/activate
|
|
||||||
../../envs/dev/bin/pip install -I ./crankshaft
|
|
||||||
../../envs/dev/bin/pip install -I nose
|
|
||||||
|
|
||||||
# Test develpment install
|
# Test develpment install
|
||||||
test:
|
test:
|
||||||
../../envs/dev/bin/nosetests crankshaft/test/
|
nosetests crankshaft/test/
|
||||||
|
|
||||||
release: ../../release/$(EXTENSION).control $(SOURCES_DATA)
|
release: ../../release/$(EXTENSION).control $(SOURCES_DATA)
|
||||||
mkdir -p ../../release/python/$(EXTVERSION)
|
mkdir -p ../../release/python/$(EXTVERSION)
|
||||||
@ -17,6 +14,4 @@ release: ../../release/$(EXTENSION).control $(SOURCES_DATA)
|
|||||||
$(SED) -i -r 's/version='"'"'[0-9]+\.[0-9]+\.[0-9]+'"'"'/version='"'"'$(EXTVERSION)'"'"'/g' ../../release/python/$(EXTVERSION)/$(PACKAGE)/setup.py
|
$(SED) -i -r 's/version='"'"'[0-9]+\.[0-9]+\.[0-9]+'"'"'/version='"'"'$(EXTVERSION)'"'"'/g' ../../release/python/$(EXTVERSION)/$(PACKAGE)/setup.py
|
||||||
|
|
||||||
deploy:
|
deploy:
|
||||||
virtualenv --system-site-packages $(VIRTUALENV_PATH)/$(RELEASE_VERSION)
|
pip install --upgrade ../../release/python/$(RELEASE_VERSION)/$(PACKAGE)
|
||||||
$(VIRTUALENV_PATH)/$(RELEASE_VERSION)/bin/pip install -I -U ../../release/python/$(RELEASE_VERSION)/$(PACKAGE)
|
|
||||||
$(VIRTUALENV_PATH)/$(RELEASE_VERSION)/bin/pip install -I nose
|
|
||||||
|
Loading…
Reference in New Issue
Block a user