On Wed, Mar 18, 2015 at 10:37 AM, Daniel Holth <dholth@gmail.com> wrote:
The behavior we're aiming for would be:

"installer run setup.py" - installs things
"python setup.py" - does not install things

yup.

Which, now that I look at it, is not so different than:

python setup.py build # does not isntall anything
python setup.py install # only install the particular package

pip install setup.py ( maybe not pass teh setup.py directly, but maybe? ) # uses pip to find and install the dependencies.

and could we get there with:

python setup.py build --no-deps
python setup.py install --no-deps

(I'd like the no-deps flag to be the default, but that probably would have to wait for a depreciation period)

None of this solves the "how to get meta-data without installing the package" problem -- which I think is what started this thread.

For that, it seems the really hacky way to get there is to establish a meta-data standard to be put in setup.py -- a bunch of  standard naems to be defined in the module namespace:

packge_version = "1.2.3"
setup_requires == ["packagea", "packageb>=2.3",]
...
(or maybe all in a big dict:

package_meta_data = {"package_version": "1.2.3"
                     setup_requires : ["packagea", "packageb>=2.3",]
                     ...
}

(those values would be passed in to setup() as well, of course)

That way, install tools, etc, could import teh setup.py, not run setup, and have access to the meta data. Of course, this would only work with packages that followed the standard, and it would be a long time until it was common, but we've got to have a direction to head to.

-Chris


--

Christopher Barker, Ph.D.
Oceanographer

Emergency Response Division
NOAA/NOS/OR&R            (206) 526-6959   voice
7600 Sand Point Way NE   (206) 526-6329   fax
Seattle, WA  98115       (206) 526-6317   main reception

Chris.Barker@noaa.gov