From de47cd69c153464efa8ce46e4117e5d4831c1eff Mon Sep 17 00:00:00 2001 From: Neil Flood Date: Tue, 28 May 2024 08:00:22 +1000 Subject: [PATCH] With guaranteed correct setuptools, can remove the fix for pypa/pip/issues/7953. Only need to sys.path modification to get version --- setup.py | 12 +++++------- 1 file changed, 5 insertions(+), 7 deletions(-) diff --git a/setup.py b/setup.py index 792371f..2774840 100644 --- a/setup.py +++ b/setup.py @@ -22,15 +22,13 @@ import os from setuptools import setup import glob -# Only need these for the site.ENABLE_USER_SITE further down -import site import sys -import rios - - -# This next line is to get around https://github.com/pypa/pip/issues/7953 -site.ENABLE_USER_SITE = "--user" in sys.argv[1:] +# When run via pyproject.toml, we seem unable to import our own package. +# To get around this, we need to add to the path. I have no idea why, +# but this seems to work fine. +sys.path.insert(0, '') +import rios # noqa: E402 # Are we installing the command line scripts? # this is an experimental option for users who are