Developer setup instructions, fix entry points in setup.py, fix requirements.txt
This commit is contained in:
parent
c5a30d1a3c
commit
2fe930e5b7
4
.gitignore
vendored
4
.gitignore
vendored
@ -12,8 +12,10 @@ build
|
|||||||
_build
|
_build
|
||||||
*.egg-info
|
*.egg-info
|
||||||
|
|
||||||
# The "standard" virtualenv directory.
|
# virtualenv directories.
|
||||||
ENV
|
ENV
|
||||||
|
ENV32
|
||||||
|
ENV64
|
||||||
|
|
||||||
#profiling/outputs
|
#profiling/outputs
|
||||||
*.log
|
*.log
|
||||||
|
85
README.md
85
README.md
@ -1,5 +1,86 @@
|
|||||||
# MCEdit 2.0
|
# MCEdit 2.0
|
||||||
|
|
||||||
MCEdit 2.0 is currently in pre-alpha.
|
MCEdit 2.0 is the next version of MCEdit, the World Editor for Minecraft. MCEdit allows you to edit every aspect of
|
||||||
|
a Minecraft world, and to import and export .schematic files created by many programs including WorldEdit and the
|
||||||
|
original MCEdit 1.x. It is free to use and licensed under the BSD license.
|
||||||
|
|
||||||
TODO: write the readme.
|
To download MCEdit 2.0, head over to http://www.mcedit.net/
|
||||||
|
|
||||||
|
The rest of this file is of interest to programmers only.
|
||||||
|
|
||||||
|
# Getting Started
|
||||||
|
|
||||||
|
This guide is written with Windows developers in mind. Linux and OS X users may find some things easier or harder.
|
||||||
|
Windows developers are assumed to be using a unix shell such as the _GIT Bash_ included with the Windows distribution
|
||||||
|
of Git.
|
||||||
|
|
||||||
|
- Install [Python for Windows v2.7.9](http://www.python.org/downloads/). Edit your PATH environment variable (or your
|
||||||
|
.bashrc) to have both the `python27` and `python27\scripts` folders. (by default, `c:\python27;c:\python27\scripts;`
|
||||||
|
- Install [Microsoft Visual C++ Compiler for Python 2.7](http://www.microsoft.com/en-us/download/details
|
||||||
|
.aspx?id=44266). This is not needed if you already have MSVC 2008 (Visual Studio 9.0) or the Windows SDK 7.0
|
||||||
|
installed, but you probably don't so install it anyway.
|
||||||
|
- Install virtualenv: `pip install virtualenv` (`pip` is now included with recent versions of Python)
|
||||||
|
- Open a bash shell and `cd` to the folder containing the MCEdit sources.
|
||||||
|
- Create a virtualenv using `virtualenv ENV`
|
||||||
|
- Activate the virtualenv using `. ENV/scripts/activate`
|
||||||
|
|
||||||
|
Now, install the required libraries.
|
||||||
|
|
||||||
|
- `pip install arrow` - a date/time class with nice text formatting.
|
||||||
|
|
||||||
|
On Windows, `easy_install` is able to install binary packages into a virtualenv
|
||||||
|
. Binary packages for the following are available at Chris Gohlke's page:
|
||||||
|
|
||||||
|
- [pyside](http://www.lfd.uci.edu/~gohlke/pythonlibs#pyside)
|
||||||
|
- [pyopengl](http://www.lfd.uci.edu/~gohlke/pythonlibs#pyopengl) (be sure to grab `PyOpenGL-accelerate` too.)
|
||||||
|
- [pywin32](http://www.lfd.uci.edu/~gohlke/pythonlibs#pywin32) (for registry access)
|
||||||
|
- [cython](http://www.lfd.uci.edu/~gohlke/pythonlibs#cython) (for building `nbt.pyd`)
|
||||||
|
- [ipython](http://www.lfd.uci.edu/~gohlke/pythonlibs#ipython) (for debugging)
|
||||||
|
- [pygments](http://www.lfd.uci.edu/~gohlke/pythonlibs#pygments) (required by IPython)
|
||||||
|
- [pyzmq](http://www.lfd.uci.edu/~gohlke/pythonlibs#pyzmq) (required by IPython)
|
||||||
|
- [numpy](http://www.lfd.uci.edu/~gohlke/pythonlibs#numpy) **
|
||||||
|
|
||||||
|
**Note that Gohlke's numpy builds use the Intel Math Kernel Library (MKL) which requires a license to use. If you
|
||||||
|
have not purchased an MKL license (it's expensive) then you ***DO NOT HAVE PERMISSION TO DISTRIBUTE APPS*** built
|
||||||
|
with it. I didn't notice any better performance with MKL regardless.
|
||||||
|
|
||||||
|
An alternative is to install the official builds of numpy from the [SourceForge Downloads](http://sourceforge.net/projects/numpy/files/NumPy/)
|
||||||
|
but 64-bit builds are not provided. If you need a 64-bit build of numpy that does not include MKL, you will need to
|
||||||
|
build it yourself. Also, the official builds are packed into a "superpack" installer which easy_install chokes on.
|
||||||
|
Just open the installer in an archiving program like [7-zip](http://www.7-zip.org/) and extract the SSE3 installer,
|
||||||
|
then `easy_install` it.
|
||||||
|
|
||||||
|
Another alternative to downloading all of the above is to download all the packages [from my dropbox folder].
|
||||||
|
Install `python-2.7.9.msi` first, then install MSVC++ for Python, virtualenv, and create and activate a virtualenv as
|
||||||
|
above. Install each of the .exe files using `easy_install` and make sure to `pip install arrow` too.
|
||||||
|
|
||||||
|
Once all of the requirements are met, install MCEdit itself into the virtualenv. This will build `nbt.pyd`, ensure
|
||||||
|
both `mcedit2` and `mceditlib` are on the pythonpath, and also create an `mcedit2` script making it easy to launch
|
||||||
|
the app.
|
||||||
|
|
||||||
|
`python setup.py develop`
|
||||||
|
|
||||||
|
All that's left is to see if the app launches.
|
||||||
|
|
||||||
|
`mcedit2`
|
||||||
|
|
||||||
|
As a bonus, you can use the `-debug` flag to enable the Debug menu and a few extra widgets.
|
||||||
|
|
||||||
|
`mcedit2 -debug`
|
||||||
|
|
||||||
|
## Linux/OS X (untested)
|
||||||
|
|
||||||
|
```
|
||||||
|
cd Documents/src/mcedit2
|
||||||
|
virtualenv ENV
|
||||||
|
. ENV/bin/activate
|
||||||
|
pip install -r requirements.txt
|
||||||
|
python setup.py develop
|
||||||
|
mcedit2
|
||||||
|
```
|
||||||
|
TODO: test this.
|
||||||
|
|
||||||
|
# Troubleshooting
|
||||||
|
|
||||||
|
- `python setup.py develop` or `build` produces the error `cannot find vcvarsall.bat` or similar.
|
||||||
|
Old version of setuptools don't know about MSVC++ for Python 2.7. Run `pip install --upgrade setuptools` to upgrade.
|
||||||
|
@ -1,5 +1,9 @@
|
|||||||
numpy
|
pyside
|
||||||
PySide
|
|
||||||
pyopengl
|
pyopengl
|
||||||
# more?
|
pywin32
|
||||||
|
cython
|
||||||
|
ipython
|
||||||
pygments
|
pygments
|
||||||
|
pyzmq
|
||||||
|
numpy
|
||||||
|
arrow
|
||||||
|
7
setup.py
7
setup.py
@ -38,11 +38,6 @@ setup(name='mceditlib',
|
|||||||
include_package_data=True,
|
include_package_data=True,
|
||||||
zip_safe=False,
|
zip_safe=False,
|
||||||
install_requires=install_requires,
|
install_requires=install_requires,
|
||||||
entry_points="""
|
|
||||||
# -*- Entry points: -*-
|
|
||||||
[console_scripts]
|
|
||||||
mce.py=mceditlib.mce:main
|
|
||||||
""",
|
|
||||||
)
|
)
|
||||||
|
|
||||||
setup(name='mcedit2',
|
setup(name='mcedit2',
|
||||||
@ -75,6 +70,6 @@ setup(name='mcedit2',
|
|||||||
entry_points="""
|
entry_points="""
|
||||||
# -*- Entry points: -*-
|
# -*- Entry points: -*-
|
||||||
[console_scripts]
|
[console_scripts]
|
||||||
mcedit2.py=mcedit2.main:main
|
mcedit2=mcedit2.main:main
|
||||||
""",
|
""",
|
||||||
)
|
)
|
||||||
|
Reference in New Issue
Block a user