Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix setup.py commands #181

Closed
BigBlueHat opened this issue Sep 22, 2015 · 6 comments
Closed

Fix setup.py commands #181

BigBlueHat opened this issue Sep 22, 2015 · 6 comments
Milestone

Comments

@BigBlueHat
Copy link
Member

python setup.py test uses a different system than the nosetests stuff we've setup. We should probably also document all the options...maybe. 😄

@iblislin
Copy link
Collaborator

Hmm... maybe we should mention that run python setup.py nosetests instead.

The python setup.py test can not run with some nose plugins we need, e,g,: coverage plugin.

FYI: https://nose.readthedocs.org/en/latest/setuptools_integration.html

@BigBlueHat
Copy link
Member Author

Good find. I made the change suggested in those docs locally, and tried them both on my Mac and here's the error I got.

$ python setup test
$ # or...both return the same error...
$ python setup.py nosetests
running nosetests
running egg_info
writing requirements to Couchapp.egg-info/requires.txt
writing Couchapp.egg-info/PKG-INFO
writing top-level names to Couchapp.egg-info/top_level.txt
writing dependency_links to Couchapp.egg-info/dependency_links.txt
writing pbr to Couchapp.egg-info/pbr.json
reading manifest file 'Couchapp.egg-info/SOURCES.txt'
reading manifest template 'MANIFEST.in'
warning: no files found matching '*' under directory 'doc'
writing manifest file 'Couchapp.egg-info/SOURCES.txt'
E
======================================================================
ERROR: Failure: ImportError (No module named errors)
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/usr/local/lib/python2.7/site-packages/nose/loader.py", line 414, in loadTestsFromName
    addr.filename, addr.module)
  File "/usr/local/lib/python2.7/site-packages/nose/importer.py", line 47, in importFromPath
    return self.importFromDir(dir_path, fqname)
  File "/usr/local/lib/python2.7/site-packages/nose/importer.py", line 94, in importFromDir
    mod = load_module(part_fqname, fh, filename, desc)
  File "/Users/byoung/dev/apps/couchapp/tests/__init__.py", line 1, in <module>
    import test_cli
  File "/Users/byoung/dev/apps/couchapp/tests/test_cli.py", line 16, in <module>
    from couchapp.errors import ResourceNotFound
ImportError: No module named errors

----------------------------------------------------------------------
Ran 1 test in 0.014s

FAILED (errors=1)

I'm also not sure how we'd hook in the .ini file. Certainly (you'd think...) it could/should/would be possible, but obviously it's not quite as straightforward as I'd hoped. 😦

That link does point us in the right direction, though! 👉

@iblislin
Copy link
Collaborator

I also got the weird import error 😨

Researching on it ... seems someone encounter the same problem ... ref

iblislin added a commit to iblislin/couchapp that referenced this issue Sep 24, 2015
This issue cause by importing `couchapp` manually with
`load_source('couchapp/__init__.py')`.

Also,
  - Some classifiers added
  - Remove useless imports: `glob` and `imp`
iblislin added a commit to iblislin/couchapp that referenced this issue Sep 24, 2015
iblislin added a commit to iblislin/couchapp that referenced this issue Sep 24, 2015
BigBlueHat added a commit that referenced this issue Nov 5, 2015
[#181] Resolve import issue and more doc
@iblislin
Copy link
Collaborator

iblislin commented Nov 6, 2015

Fixed via 744df80
#184

@BigBlueHat
Copy link
Member Author

You rock, @iblis17...as ever! 😸

@iblislin
Copy link
Collaborator

😄

@iblislin iblislin modified the milestone: 1.0.2 Jan 14, 2016
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants