-
Notifications
You must be signed in to change notification settings - Fork 524
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
Merging setup #83
Merging setup #83
Conversation
The content of this script was posted by Greg Wilson and attributed to Konrad Hinsen [1]. [1]: swcarpentry/website-archive#38 (comment)
This script was linked to by Eric Bray [1] and hosted on Fernando Perez's website [2]. [1]: swcarpentry/website-archive#38 (comment) [2]: http://fperez.org/py4science/workshop_checklist.py
Based on a list of possibilities mentioned by Cait Pickens in an internal email.
Often we don't care which editor is installed, so long as at least one is installed. This commit tweaks Dependency and adds a VirtualDependency class to support such virtual dependencies. You can't get very fancy with boolean logic, but an all-and and all-or lists will probably be sufficient for our needs.
Use distutils' new_compiler() to get the appropriate exe_extension for the user's system. This way command names can always be specified in their bare form, and we'll automatically add the right executable extension for other platforms.
Avoid running the same check (e.g. 'python') over and over.
For example, if you have an outdated 'python', you only want to hear about that once, not once for each PythonPackageDependency.
This makes it easy to see what a user has installed.
Exception chaining (PEP 3134, 'raise ... from') raises SyntaxErros in Python 2.x. Comment the chaining out until SWC starts teaching only Python 3.x.
Otherwise `print()` actually prints `()`, where we want it to print a blank line.
importlib is new in Python 2.7 / 3.1. Add a minimal workaround for earlier versions.
…sion Split it into pieces for easier subclassing.
The Mercurial Python package stores its version in strange places.
The 'sqlite3' package has the same version as the standard library. We only check for it because sometimes (e.g. on Gentoo) Python may be compiled without this package.
I have access to a machine running OS X 10.6.8, which has: $ bash --version GNU bash, version 3.2.48(1)-release (x86_64-apple-darwin10.0) Copyright (C) 2007 Free Software Foundation, Inc. That means no associative arrays, but for SWC purposes, it should still get the job done. All we really need is POSIX.2.
Commit to POSIX.2 [1] compatibility by allowing additional shells. If anyone has something besides sh, bash, or dash installed, they probably know how to use it ;). [1]: http://pubs.opengroup.org/onlinepubs/009695399/utilities/xcu_chap02.html IEEE Std 1003.2-1992
Distribute's easy_install supports --version (at least since 0.6.21), but Setuptool's original version does not (at least as of 0.6c9). Assume that if we get some kind of reasonable output from `easy_install --version` we're dealing with the Setuptools version.
Xcode 4.0.2 for OS X 10.6.8 shipped with Git 1.7.3.4.
Dodge the logic which (at least in Python 2.6.1) raises: DeprecationWarning: BaseException.message has been deprecated as of Python 2.6 We're setting the .message attribute explicitly, so the deprecation warning does not apply to us. The fix was suggested by Brett Cannon: On Sun Jul 8 02:42:18 CEST 2007, Brett Cannon wrote [1]: > You can get around this easily enough with a subclass that uses a > property for message:: > > class gerror(Exception): > def _get_message(self, message): return self._message > def _set_message(self, message): self._message = message > message = property(_get_message, _set_message) [1]: http://mail.python.org/pipermail/python-dev/2007-July/073777.html
We already told them how to do this in swc-installation-test-1.py, hopefully they remember ;).
This can link to the "howto setup Python" notes from SWC once those get a more precise link than: http://software-carpentry.org/setup/
I can't give package-specific links yet, but they will hopefully be in place soon. I made the "email your instructor" suggestion optional, because it is easy for me to imagine a course large enough that the instructor could not field all requests. To disable, change print_suggestions(instructor_fallback=True) to print_suggestions(instructor_fallback=False)
No need to test the other dependencies once you find one that matches.
Placing the often-symlinked `sh` at the end of the list. This way if a user has Bash installed, it doesn't show up as plain old Bourne.
The Windows installer opens a shell while running. This adds some text to that shell so that it is clear that something is happening.
setup/README.md: Convert 'boot camp' -> 'workshop'
…shop-template into merging-setup
On Tue, Dec 16, 2014 at 10:30:29AM -0800, Greg Wilson wrote:
Are these rebased? The installation-test commits don't seem to match: $ git glog origin/pr/83
and in my installation-test repository: $ git glog --all
I don't see 52dfe3b outside this repository. I think I posted my |
If all of the contributions from all of the contributors are present, |
On Tue, Dec 16, 2014 at 10:54:46AM -0800, Greg Wilson wrote:
That's going to lead to duplicate history as soon as you merge future |
On Tue, Dec 16, 2014 at 10:30:29AM -0800, Greg Wilson wrote:
If the setup instructions will live here, we can point to |
Hi Trevor, On 2014-12-16 1:56 PM, W. Trevor King wrote:
Dr. Greg Wilson | [email protected] |
On 2014-12-16 1:59 PM, W. Trevor King wrote:
Dr. Greg Wilson | [email protected] |
On Tue, Dec 16, 2014 at 11:00:32AM -0800, Greg Wilson wrote:
For the installation-test stuff there's nothing to fix. If you want $ git pull git://tremily.us/swc-setup-installation-test.git bc-namespaced
I'm not sure what's in this pull request besides my installation-test |
On Tue, Dec 16, 2014 at 11:01:12AM -0800, Greg Wilson wrote:
I was just going to have them edit the URL in the script itself, for |
On Tue, Dec 16, 2014 at 11:12:45AM -0800, W. Trevor King wrote:
Folks using this script should already be editing by hand (as |
On Tue, Dec 16, 2014 at 11:20:22AM -0800, W. Trevor King wrote:
And this is really an issue that should be addressed upstream in the |
Discussion of URLs moved to #85. |
On Wed, Dec 17, 2014 at 06:50:58AM -0800, Greg Wilson wrote:
Hmm. I don't remember any further discussion about how this should go Tue, Dec 16, 2014 at 11:04:53AM -0800, W. Trevor King:
So why press on and merge despite that suggestion without at least 5b65a34 (Pulling in setup files, 2014-12-16) also does a bunch of $ git log -1 --stat=160 -M20 5b65a34
index.html | 5 ++ Breaking that down:
If we leave go forward with 58df3bd, I think it basically means that $ git pull git://tremily.us/swc-setup-installation-test.git bc-namespaced I keep suggesting ;). |
Sorry for pushing ahead @wking, but the clock's run out. |
On Wed, Dec 17, 2014 at 10:22:43AM -0800, Greg Wilson wrote:
My proposed pull command is a single copy/paste, and I proposed it a |
On Wed, Dec 17, 2014 at 11:24:56AM -0800, W. Trevor King wrote:
If this wasn't a conscious descision to drop compatiblity with my $ git checkout gh-pages Fixing anyone who's already based work on the broken commit will be |
Wasn't a conscious decision at all - I'm just completely screwed for
|
On Wed, Dec 17, 2014 at 12:28:27PM -0800, Greg Wilson wrote:
Done.
I'm happy to help with these things, but I'll need more guidance on You 1: “If you can fix this now, please do - otherwise, I'm going I'm reasonably responsive here, if you think there's something I can |
This includes #61:
setup
directory from the 'bc' repository.README.md
To do:
README.md
to tell instructors that these scripts exist?