-
Notifications
You must be signed in to change notification settings - Fork 196
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #34 from mcdevs/master
setup.py cleanup, README.md
- Loading branch information
Showing
5 changed files
with
304 additions
and
236 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,19 +1,20 @@ | ||
|
||
# git-ls-files --others --exclude-from=.git/info/exclude | ||
# Lines that start with '#' are comments. | ||
# For a project mostly in C, the following would be a good set of | ||
# exclude patterns (uncomment them if you want to use them): | ||
# *.[oa] | ||
# *~ | ||
|
||
# Python object code. | ||
*.pyc | ||
*.pyo | ||
*~ | ||
|
||
# Vim temporary files. | ||
*.sw* | ||
|
||
# Folders created by setup.py. | ||
dist | ||
build | ||
*.egg-info | ||
|
||
# The "standard" virtualenv directory. | ||
ENV | ||
|
||
#profiling/outputs | ||
mcedit.ini | ||
*.log | ||
mcedit.profile | ||
mcedit.profile |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,63 @@ | ||
# MCEdit | ||
|
||
MCEdit is an open-source, BSD-licenced world editor for the viral indie hit [Minecraft](http://www.minecraft.net/). | ||
|
||
## For Developers | ||
|
||
MCEdit is written in Python using a variety of open source modules. When developing it is recommended to use virtualenv to keep dependencies sane and to easy deployment. | ||
|
||
### Development Quick Guide | ||
|
||
You'll need Python 2.6+ and `easy_install`/`pip` at a minimum before getting started. This quick guide assumes a unix-y OS. | ||
|
||
Clone MCEdit: | ||
|
||
```bash | ||
git clone https://github.com/mcdevs/mcedit | ||
cd mcedit | ||
git submodule init | ||
git submodule update | ||
``` | ||
|
||
Optionally (but highly recommended), setup and activate [virtualenv](http://pypi.python.org/pypi/virtualenv). virtualenv will simplify development by creating an isolated and barebones Python environment. Anything you install while virtualenv is active won't affect your system-wide Python installation, for example. | ||
|
||
```bash | ||
easy_install virtualenv | ||
virtualenv ENV | ||
. ENV/bin/activate | ||
``` | ||
|
||
Install various dependencies. This may take a bit (especially numpy). If installing pygame errors, try installing from a [binary packages](http://pygame.org/install.html) or following one of the guides from that page to install from source. | ||
|
||
```bash | ||
easy_install PyOpenGL | ||
easy_install numpy | ||
easy_install pygame | ||
easy_install pyyaml | ||
``` | ||
|
||
You should now be able to run MCEdit with `python main.py` assuming you've installed all the dependencies correctly. | ||
|
||
### Freezing/Packaging | ||
|
||
"Freezing" Python applications to deploy them for use by non-technical users is not in any way fun, expect errors and edge cases. | ||
|
||
Additional dependenies are required to package MCEdit. Regardless of which platform you're targetting, [esky](http://pypi.python.org/pypi/esky/) will be required. | ||
|
||
#### OS X | ||
*Note:* These instructions have only been testing on OS X Lion. | ||
|
||
You will run into errors attempting to use the system Python when packaging anything under OS X. The easiest way to install a new Python is by using [Homebrew](http://mxcl.github.com/homebrew/). | ||
|
||
If you were using the system python while developing and using virtualenv, you'll need to overwrite it with your newly installed version. | ||
|
||
```bash | ||
brew install python | ||
virtualenv -p /usr/local/bin/python ENV | ||
|
||
easy_install esky | ||
easy_install py2app | ||
python setup.py bdist_esky | ||
``` | ||
|
||
This will leave you with a zip file in `dist/` that contains a portable `.app` bundle. |
Oops, something went wrong.