Skip to content

Commit

Permalink
* update build instructions
Browse files Browse the repository at this point in the history
  • Loading branch information
Ryan Clary committed Apr 4, 2020
1 parent 6fd2b23 commit 1e1febf
Showing 1 changed file with 18 additions and 8 deletions.
26 changes: 18 additions & 8 deletions Readme.md
Original file line number Diff line number Diff line change
Expand Up @@ -16,14 +16,16 @@ Once you have the above requirements, you will create a virtual environment from
In principle, it doesn't matter where your Python installation comes from except that it cannot come from Anaconda.
I do not know exactly why an Anaconda installation does not work except that it has something to do with hardlinks.

I recommend using [Homebrew](http://brew.sh/) to install Python, along with pyenv and pyenv-virtualenv (if you plan to use these for virtual environment management).
I recommend using [Homebrew](http://brew.sh/) to install pyenv and pyenv-virtualenv (if you plan to use these for virtual environment management).
If you plan to use pyenv, you don't even need to install Python from Homebrew, since pyenv will install whatever python version you request.
If you don't plan to use pyenv, then you will need to install Python from Homebrew or elsewhere.

After installing Homebrew, run:
```
$ brew install python3, pyenv, pyenv-virtualenv
$ brew install pyenv, pyenv-virtualenv
```

If you use pyenv must enable frameworks in your Python installation, as follows.
If you use pyenv you must enable frameworks in your Python installation, as follows.
If you are using venv, you can ignore this.
```
$ PYTHON_CONFIGURE_OPTS='--enable-framework'
Expand All @@ -40,18 +42,20 @@ If you are using pyenv with pyenv-virtualenv, it will look like this:
```
$ pyenv virtualenv <python version> env-spy-dev
$ pyenv local env-spy-dev
(env-spy-dev) $ pip install --upgrade pip
(env-spy-dev) $ pip install -r requirements.txt
(env-spy-dev) $ pip install -r req-base.txt -r req-build.txt -r req-user.txt
```

If you are using venv, it will look like this:
```
$ python -m venv --clear --copies env-spy-dev
$ source env-spy-dev/bin/activate
(env-spy-dev) $ pip install --upgrade pip
(env-spy-dev) $ pip install -r requirements.txt
(env-spy-dev) $ pip install -r req-base.txt -r req-build.txt -r req-user.txt
```

`req-base.txt` contains the minimum required packages for Spyder to run.
`req-build.txt` contains only those packages required to build the stand-alone application.
`req-user.txt` contains optional packages to include, if desired, for use in iPython consoles launched from "Same as Spyder" environments.
If you use external environments, such as conda, for your iPython consoles, you don't need these.

### Create the Standalone Application

For the build to work properly, your local clones of both spyder and spyder-kernels must be at the same directory level as your local clone of this repository.
Expand All @@ -63,3 +67,9 @@ To create the standalone application and package it in a dmg disk image run:
After a whole lot of screen dump, and if everything went well, you should now have two files in the `dist` folder of this repository:
* Spyder.app
* Spyder-\<Spyder version\> Py-\<Python version\>.dmg

The following commandline optional arguments are available:
* `py2app`: this causes the bundled app to be produced. Omitting this argument will run `setup.py` without building the app.
* `-A`: This causes py2app to build the application in "alias" mode; basically a quicker way to build the app for debugging, but is not very reliable.
* `--lite`: This will cause py2app to exclude the optional user packages from the application bundle (approximately 250MB).
* `--no-dmg`: This will prevent the dmg disk-image from being created

0 comments on commit 1e1febf

Please sign in to comment.