openworm / owmeta

Unified, simple data access python library for data & facts about C. elegans anatomy
MIT License
152 stars 49 forks source link

Enable python setup.py install to work #37

Closed slarson closed 10 years ago

slarson commented 10 years ago

Currently Travis CI testing under the zodb-install and the zodb branches works but only with running python setup.py develop. Let's get python setup.py install to work as well.

Current error during python setup.py install in the zodb-install branch:

$ python setup.py install
Compiling C. elegans data
Traceback (most recent call last):
  File "setup.py", line 32, in <module>
    insert_worm.do_insert()
  File "/home/travis/build/openworm/PyOpenWorm/db/insert_worm.py", line 232, in do_insert
    P.connect(configFile='default.conf',do_logging=logging)
  File "/home/travis/build/openworm/PyOpenWorm/PyOpenWorm/__init__.py", line 134, in connect
    loadConfig(configFile)
  File "/home/travis/build/openworm/PyOpenWorm/PyOpenWorm/__init__.py", line 98, in loadConfig
    Configureable.conf = Data.open(f)
  File "/home/travis/build/openworm/PyOpenWorm/PyOpenWorm/data.py", line 221, in open
    Configureable.conf = Configure.open(file_name)
  File "/home/travis/build/openworm/PyOpenWorm/PyOpenWorm/configure.py", line 80, in open
    value = resource_filename(Requirement.parse("PyOpenWorm"), value)
  File "/home/travis/virtualenv/python2.7.8/lib/python2.7/site-packages/pkg_resources.py", line 895, in resource_filename
    return get_provider(package_or_requirement).get_resource_filename(
  File "/home/travis/virtualenv/python2.7.8/lib/python2.7/site-packages/pkg_resources.py", line 225, in get_provider
    return working_set.find(moduleOrReq) or require(str(moduleOrReq))[0]
  File "/home/travis/virtualenv/python2.7.8/lib/python2.7/site-packages/pkg_resources.py", line 685, in require
    needed = self.resolve(parse_requirements(requirements))
  File "/home/travis/virtualenv/python2.7.8/lib/python2.7/site-packages/pkg_resources.py", line 588, in resolve
    raise DistributionNotFound(req)
pkg_resources.DistributionNotFound: PyOpenWorm
The command "python setup.py install" failed and exited with 1 during .
Your build has been stopped.
slarson commented 10 years ago

It seems to me that the problem is that something needs to be run during install that requires the package to be installed. We need to somehow separate those two things; install should not depend on the library itself being installed...

slarson commented 10 years ago

@mwatts15 please ping this issue when you have updates -- this is on the critical path to finishing up. Thanks!

mwatts15 commented 10 years ago

Trying to find a good way to install a database file with a python module. I'm in favor of doing a series of post-install questions to copy the defaults over. I'm worried that Windows users might not have a command line for install.

slarson commented 10 years ago

How's that going?

On Sunday, August 17, 2014, mwatts15 notifications@github.com wrote:

Trying to find a good way to install a database file with a python module. I'm in favor of doing a series of post-install questions to copy the defaults over. I'm worried that Windows users might not have a command line for install.

— Reply to this email directly or view it on GitHub https://github.com/openworm/PyOpenWorm/issues/37#issuecomment-52437747.

jrlandau commented 10 years ago

I know this is none of my business, but I just installed on Win7 by following the readme instructions in nobrain fashion. It seemed to work, passed the test, and executes the examples. What am I doing wrong?

slarson commented 10 years ago

Great that everything worked for you. You're probably installing the master branch, which is known to work. We're talking about the https://github.com/openworm/PyOpenWorm/tree/alpha0.5 branch. And recently now, we've been working on the https://github.com/openworm/PyOpenWorm/tree/zodb branch, which branches off of alpha0.5. Actually, @mwatts15 I think we should merge these now -- any objections?

On Mon, Aug 18, 2014 at 4:21 PM, Joe Landau notifications@github.com wrote:

I know this is none of my business, but I just installed on Win7 by following the readme instructions in nobrain fashion. It seemed to work, passed the test, and executes the examples. What am I doing wrong?

— Reply to this email directly or view it on GitHub https://github.com/openworm/PyOpenWorm/issues/37#issuecomment-52569458.

slarson commented 10 years ago

@mwatts15 thanks for merging. Are you feeling like the database install issue is resolved?

mwatts15 commented 10 years ago

The problem for which this ticket was opened doesn't exist in the latest alpha. However, until I resolve or at least understand the cause of the issue which I mention on the pull request, I can't provide support for the ZODB install.