diff --git a/Makefile b/Makefile index 494a4298..d05c6a51 100644 --- a/Makefile +++ b/Makefile @@ -5,11 +5,7 @@ SHELL := bash # Set the package's name and version for use throughout the Makefile. PACKAGE_NAME := package -ifeq ($(origin VIRTUAL_ENV),undefined) - PACKAGE_VERSION := unknown -else - PACKAGE_VERSION := $(shell python -c 'import $(PACKAGE_NAME); print($(PACKAGE_NAME).__version__)') -endif +PACKAGE_VERSION := $(shell python -c $$'try: import $(PACKAGE_NAME); print($(PACKAGE_NAME).__version__);\nexcept: print("unknown");') # This variable contains the first goal that matches any of the listed goals # here, else it contains an empty string. The net effect is to filter out