From 45eced0579f79f8fd0ea4b38ac350557f6fa3bc1 Mon Sep 17 00:00:00 2001 From: Ryan Ly Date: Fri, 13 Aug 2021 13:41:57 -0700 Subject: [PATCH] ENH: Ensure that sys.path has the current directory in setup.py (#662) --- CHANGELOG.md | 5 +++++ setup.py | 8 +++++++- 2 files changed, 12 insertions(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 2e414a102..a917bb6ad 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,10 @@ # HDMF Changelog +## HDMF 3.1.2 (Upcoming) + +### Fixes +- Fixed `setup.py` not being able to import `versioneer` when installing in an embedded Python environment. @rly (#662) + ## HDMF 3.1.1 (July 29, 2021) ### Fixes diff --git a/setup.py b/setup.py index a774f3328..807bfdb2e 100755 --- a/setup.py +++ b/setup.py @@ -1,6 +1,12 @@ -# -*- coding: utf-8 -*- +# -*- coding: utf-8 -* +import sys + from setuptools import setup, find_packages +# Some Python installations don't add the current directory to path. +if '' not in sys.path: + sys.path.insert(0, '') + import versioneer with open('README.rst', 'r') as fp: