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

Setuptools #123

Merged
merged 3 commits into from
Sep 19, 2013
Merged

Setuptools #123

merged 3 commits into from
Sep 19, 2013

Conversation

mstimberg
Copy link
Member

Ok, the basic switch is done, if it works for you (I only tested on Linux), I think it is ready to merge.

Not much did change, there are some differences/new features, though:

  • We do not have to update the list of packages whenever we rename/add/delete packages, only the template directories (because they are no Python packages) have to be mentioned explicitly
  • There's an ez_setup bootstrap file which automatically downloads setuptools if it is not installed already. This is irrelevant in most cases (where users use pip or easy_install to download from pypi) but is a nice extra if you download the source tarball or clone the repository from git.
  • We can build the documentation with python setup.py build_sphinx (this needs sphinx, of course). I think it's nice to include the doc sources in the source tarball, a user downloading the package can then build the docs on their own machine. It doesn't take up much space since we do not have to include the reference section which is auto-generated.
  • We can run the test suite with python setup.py nosetests -- this does not seem very useful at first (after all, you can also run nosetests directly), but it is a nice shortcut for testing under Python 3: just use python3 setup.py nosetests and it will run the code through 2to3 and then run the test suite on the Python3 code.

As a general "note to ourselves": We should try not to rely on the __file__ attribute of modules but rather use the pkg_resource mechanism (I changed this for the templates). In principle Python packages can be installed as single zip files and then the assumption of modules being files in the file system fails.

mstimberg added 3 commits September 19, 2013 01:04
…r use PackageLoader instead of FileSystemLoader (this should then also work for brian2 installed as a zip file)
@coveralls
Copy link

Coverage Status

Coverage remained the same when pulling d75ca8b on setuptools into 3e6f519 on master.

@thesamovar
Copy link
Member

Great! I'll test it on Windows alter this afternoon and merge if all is fine.

@thesamovar
Copy link
Member

Also, good call on the pkg_resource - I'd been vaguely worrying about the zip file issue for a while but didn't know how to solve it.

@thesamovar
Copy link
Member

OK works fine on Windows!

thesamovar added a commit that referenced this pull request Sep 19, 2013
@thesamovar thesamovar merged commit ac71ad0 into master Sep 19, 2013
@thesamovar thesamovar deleted the setuptools branch September 19, 2013 16:41
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

Successfully merging this pull request may close these issues.

3 participants