mirror of
https://github.com/evennia/evennia.git
synced 2025-10-29 11:26:10 +00:00
Support install from pypi (rc1)
This commit is contained in:
parent
6c52fd0da9
commit
8787f8c34f
37
.github/workflows/github_action_publish_to_pypi.yml
vendored
Normal file
37
.github/workflows/github_action_publish_to_pypi.yml
vendored
Normal file
@ -0,0 +1,37 @@
|
||||
# This Evennia workflow will deploy the Evennia package automatically to
|
||||
# test-pypi and to pypi (if tag was given).
|
||||
#
|
||||
|
||||
name: publish-evennia
|
||||
|
||||
on:
|
||||
push:
|
||||
branches: [ master, develop ]
|
||||
|
||||
jobs:
|
||||
build-and-publish:
|
||||
name: Build and publish Evennia to PyPi
|
||||
runs-on: ubuntu-latest
|
||||
|
||||
steps:
|
||||
- uses: actions/checkout@master
|
||||
|
||||
- name: Set up Python 3.11
|
||||
uses: actions/setup-python@v3
|
||||
with:
|
||||
python-version: "3.11"
|
||||
|
||||
- name: Install build
|
||||
run: |
|
||||
python -m pip install --upgrade pip
|
||||
python -m pip install build --user
|
||||
|
||||
- name: Build binary wheel and source tarball
|
||||
run: |
|
||||
python -m build --sdist --wheel --outdir dist/ .
|
||||
|
||||
- name: Publish Evennia PyPi (on tag)
|
||||
if: startsWith(github.ref, 'refs/tags')
|
||||
uses: pypa/gh-action-pypi-publish@release/v1
|
||||
with:
|
||||
password: ${{ secrets.PYPI_API_TOKEN }}
|
||||
@ -1,9 +1,7 @@
|
||||
# Installing on Android
|
||||
|
||||
|
||||
This page describes how to install and run the Evennia server on an Android phone. This will involve
|
||||
installing a slew of third-party programs from the Google Play store, so make sure you are okay with
|
||||
this before starting.
|
||||
This page describes how to install and run the Evennia server on an Android phone. This will involve installing a slew of third-party programs from the Google Play store, so make sure you are okay with this before starting.
|
||||
|
||||
```{warning}
|
||||
Android installation is experimental and not tested with later versions of Android.
|
||||
@ -12,23 +10,16 @@ Report your findings.
|
||||
|
||||
## Install Termux
|
||||
|
||||
The first thing to do is install a terminal emulator that allows a "full" version of linux to be
|
||||
run. Note that Android is essentially running on top of linux so if you have a rooted phone, you may
|
||||
be able to skip this step. You *don't* require a rooted phone to install Evennia though.
|
||||
The first thing to do is install a terminal emulator that allows a "full" version of linux to be run. Note that Android is essentially running on top of linux so if you have a rooted phone, you may be able to skip this step. You *don't* require a rooted phone to install Evennia though.
|
||||
|
||||
Assuming we do not have root, we will install
|
||||
[Termux](https://play.google.com/store/apps/details?id=com.termux&hl=en).
|
||||
Termux provides a base installation of Linux essentials, including apt and Python, and makes them
|
||||
available under a writeable directory. It also gives us a terminal where we can enter commands. By
|
||||
default, Android doesn't give you permissions to the root folder, so Termux pretends that its own
|
||||
installation directory is the root directory.
|
||||
Assuming we do not have root, we will install [Termux](https://play.google.com/store/apps/details?id=com.termux&hl=en). Termux provides a base installation of Linux essentials, including apt and Python, and makes them available under a writeable directory. It also gives us a terminal where we can enter commands. By default, Android doesn't give you permissions to the root folder, so Termux pretends that its own installation directory is the root directory.
|
||||
|
||||
Termux will set up a base system for us on first launch, but we will need to install some
|
||||
prerequisites for Evennia. Commands you should run in Termux will look like this:
|
||||
Termux will set up a base system for us on first launch, but we will need to install some prerequisites for Evennia. Commands you should run in Termux will look like this:
|
||||
|
||||
```
|
||||
$ cat file.txt
|
||||
```
|
||||
|
||||
The `$` symbol is your prompt - do not include it when running commands.
|
||||
|
||||
## Prerequisites
|
||||
|
||||
@ -40,57 +40,30 @@ You can run Evennia from inside this container if you want to, it's like you are
|
||||
isolated Linux environment. To exit the container and all processes in there, press `Ctrl-D`. If you
|
||||
created a new game folder, you will find that it has appeared on-disk.
|
||||
|
||||
> The game folder or any new files that you created from inside the container will appear as owned
|
||||
by `root`. If you want to edit the files outside of the container you should change the ownership.
|
||||
On Linux/Mac you do this with `sudo chown myname:myname -R mygame`, where you replace `myname` with
|
||||
your username and `mygame` with whatever your game folder is named.
|
||||
> The game folder or any new files that you created from inside the container will appear as owned by `root`. If you want to edit the files outside of the container you should change the ownership. On Linux/Mac you do this with `sudo chown myname:myname -R mygame`, where you replace `myname` with your username and `mygame` with whatever your game folder is named.
|
||||
|
||||
Below is an explanation of the `docker run` command we used:
|
||||
|
||||
- `docker run ... evennia/evennia` tells us that we want to run a new container based on the
|
||||
`evennia/evennia` docker image. Everything in between are options for this. The `evennia/evennia` is
|
||||
the name of our [official docker image on the dockerhub
|
||||
repository](https://hub.docker.com/r/evennia/evennia/). If you didn't do `docker pull
|
||||
evennia/evennia` first, the image will be downloaded when running this, otherwise your already
|
||||
downloaded version will be used. It contains everything needed to run Evennia.
|
||||
- `docker run ... evennia/evennia` tells us that we want to run a new container based on the `evennia/evennia` docker image. Everything in between are options for this. The `evennia/evennia` is the name of our [official docker image on the dockerhub repository](https://hub.docker.com/r/evennia/evennia/). If you didn't do `docker pull evennia/evennia` first, the image will be downloaded when running this, otherwise your already downloaded version will be used. It contains everything needed to run Evennia.
|
||||
- `-it` has to do with creating an interactive session inside the container we start.
|
||||
- `--rm` will make sure to delete the container when it shuts down. This is nice to keep things tidy
|
||||
on your drive.
|
||||
- `-p 4000:4000 -p 4001:4001 -p 4002:4002` means that we *map* ports `4000`, `4001` and `4002` from
|
||||
inside the docker container to same-numbered ports on our host machine. These are ports for telnet,
|
||||
webserver and websockets. This is what allows your Evennia server to be accessed from outside the
|
||||
container (such as by your MUD client)!
|
||||
- `-v $PWD:/usr/src/game` mounts the current directory (*outside* the container) to the path
|
||||
`/usr/src/game` *inside* the container. This means that when you edit that path in the container you
|
||||
will actually be modifying the "real" place on your hard drive. If you didn't do this, any changes
|
||||
would only exist inside the container and be gone if we create a new one. Note that in linux a
|
||||
shortcut for the current directory is `$PWD`. If you don't have this for your OS, you can replace it
|
||||
with the full path to the current on-disk directory (like `C:/Development/evennia/game` or wherever
|
||||
you want your evennia files to appear).
|
||||
- `--user $UID:$GID` ensures the container's modifications to `$PWD` are done with you user and
|
||||
group IDs instead of root's IDs (root is the user running evennia inside the container). This avoids
|
||||
having stale `.pid` files in your filesystem between container reboots which you have to force
|
||||
delete with `sudo rm server/*.pid` before each boot.
|
||||
- `-p 4000:4000 -p 4001:4001 -p 4002:4002` means that we *map* ports `4000`, `4001` and `4002` from inside the docker container to same-numbered ports on our host machine. These are ports for telnet, webserver and websockets. This is what allows your Evennia server to be accessed from outside the container (such as by your MUD client)!
|
||||
- `-v $PWD:/usr/src/game` mounts the current directory (*outside* the container) to the path `/usr/src/game` *inside* the container. This means that when you edit that path in the container you will actually be modifying the "real" place on your hard drive. If you didn't do this, any changes would only exist inside the container and be gone if we create a new one. Note that in linux a shortcut for the current directory is `$PWD`. If you don't have this for your OS, you can replace it with the full path to the current on-disk directory (like `C:/Development/evennia/game` or wherever you want your evennia files to appear).
|
||||
- `--user $UID:$GID` ensures the container's modifications to `$PWD` are done with you user and group IDs instead of root's IDs (root is the user running evennia inside the container). This avoids having stale `.pid` files in your filesystem between container reboots which you have to force delete with `sudo rm server/*.pid` before each boot.
|
||||
|
||||
## Running your game as a docker image
|
||||
|
||||
If you run the `docker` command given in the previous section from your game dir you can then
|
||||
easily start Evennia and have a running server without any further fuss.
|
||||
|
||||
But apart from ease of install, the primary benefit to running an Evennia-based game in a container
|
||||
is to simplify its deployment into a public production environment. Most cloud-based hosting
|
||||
But apart from ease of install, the primary benefit to running an Evennia-based game in a container is to simplify its deployment into a public production environment. Most cloud-based hosting
|
||||
providers these days support the ability to run container-based applications. This makes deploying
|
||||
or updating your game as simple as building a new container image locally, pushing it to your Docker
|
||||
Hub account, and then pulling from Docker Hub into your AWS/Azure/other docker-enabled hosting
|
||||
account. The container eliminates the need to install Python, set up a virtualenv, or run pip to
|
||||
install dependencies.
|
||||
or updating your game as simple as building a new container image locally, pushing it to your Docker Hub account, and then pulling from Docker Hub into your AWS/Azure/other docker-enabled hosting account. The container eliminates the need to install Python, set up a virtualenv, or run pip to install dependencies.
|
||||
|
||||
### Start Evennia and run through docker
|
||||
|
||||
For remote or automated deployment you may want to start Evennia immediately as soon as the docker
|
||||
container comes up. If you already have a game folder with a database set up you can also start the
|
||||
docker container and pass commands directly to it. The command you pass will be the main process to
|
||||
run in the container. From your game dir, run for example this command:
|
||||
For remote or automated deployment you may want to start Evennia immediately as soon as the docker container comes up. If you already have a game folder with a database set up you can also start the docker container and pass commands directly to it. The command you pass will be the main process to run in the container. From your game dir, run for example this command:
|
||||
|
||||
docker run -it --rm -p 4000:4000 -p 4001:4001 -p 4002:4002 --rm -v $PWD:/usr/src/game evennia/evennia evennia start -l
|
||||
|
||||
@ -101,9 +74,7 @@ and the container go down.
|
||||
|
||||
## Create your own game image
|
||||
|
||||
These steps assume that you have created or otherwise obtained a game directory already. First, `cd`
|
||||
to your game dir and create a new empty text file named `Dockerfile`. Save the following two lines
|
||||
into it:
|
||||
These steps assume that you have created or otherwise obtained a game directory already. First, `cd` to your game dir and create a new empty text file named `Dockerfile`. Save the following two lines into it:
|
||||
|
||||
```
|
||||
FROM evennia/evennia:latest
|
||||
@ -122,9 +93,7 @@ To build the image:
|
||||
```
|
||||
|
||||
(don't forget the period at the end, it will use the `Dockerfile` from the current location). Here
|
||||
`mydhaccount` is the name of your `dockerhub` account. If you don't have a dockerhub account you can
|
||||
build the image locally only (name the container whatever you like in that case, like just
|
||||
`mygame`).
|
||||
`mydhaccount` is the name of your `dockerhub` account. If you don't have a dockerhub account you can build the image locally only (name the container whatever you like in that case, like just `mygame`).
|
||||
|
||||
Docker images are stored centrally on your computer. You can see which ones you have available
|
||||
locally with `docker images`. Once built, you have a couple of options to run your game.
|
||||
@ -153,9 +122,7 @@ option and just give the following command:
|
||||
docker run -it --rm -d -p 4000:4000 -p 4001:4001 -p 4002:4002 --user $UID:$GID mydhaccount/mygame
|
||||
```
|
||||
|
||||
Your game will be downloaded from your docker-hub account and a new container will be built using
|
||||
the image and started on the server! If your server environment forces you to use different ports,
|
||||
you can just map the normal ports differently in the command above.
|
||||
Your game will be downloaded from your docker-hub account and a new container will be built using the image and started on the server! If your server environment forces you to use different ports, you can just map the normal ports differently in the command above.
|
||||
|
||||
Above we added the `-d` option, which starts the container in *daemon* mode - you won't see any
|
||||
return in the console. You can see it running with `docker ps`:
|
||||
@ -193,26 +160,20 @@ container will get a new container id to reference.
|
||||
|
||||
## How it Works
|
||||
|
||||
The `evennia/evennia` docker image holds the evennia library and all of its dependencies. It also
|
||||
has an `ONBUILD` directive which is triggered during builds of images derived from it. This
|
||||
`ONBUILD` directive handles setting up a volume and copying your game directory code into the proper
|
||||
location within the container.
|
||||
The `evennia/evennia` docker image holds the evennia library and all of its dependencies. It also has an `ONBUILD` directive which is triggered during builds of images derived from it. This
|
||||
`ONBUILD` directive handles setting up a volume and copying your game directory code into the proper location within the container.
|
||||
|
||||
In most cases, the Dockerfile for an Evennia-based game will only need the `FROM
|
||||
evennia/evennia:latest` directive, and optionally a `MAINTAINER` directive if you plan to publish
|
||||
In most cases, the Dockerfile for an Evennia-based game will only need the `FROM evennia/evennia:latest` directive, and optionally a `MAINTAINER` directive if you plan to publish
|
||||
your image on Docker Hub and would like to provide contact info.
|
||||
|
||||
For more information on Dockerfile directives, see the [Dockerfile
|
||||
Reference](https://docs.docker.com/engine/reference/builder/).
|
||||
For more information on Dockerfile directives, see the [Dockerfile Reference](https://docs.docker.com/engine/reference/builder/).
|
||||
|
||||
For more information on volumes and Docker containers, see the Docker site's [Manage data in
|
||||
containers](https://docs.docker.com/engine/tutorials/dockervolumes/) page.
|
||||
|
||||
### What if I Don't Want "LATEST"?
|
||||
|
||||
A new `evennia/evennia` image is built automatically whenever there is a new commit to the `master`
|
||||
branch of Evennia. It is possible to create your own custom evennia base docker image based on any
|
||||
arbitrary commit.
|
||||
A new `evennia/evennia` image is built automatically whenever there is a new commit to the `master` branch of Evennia. It is possible to create your own custom evennia base docker image based on any arbitrary commit.
|
||||
|
||||
1. Use git tools to checkout the commit that you want to base your image upon. (In the example
|
||||
below, we're checking out commit a8oc3d5b.)
|
||||
@ -236,9 +197,7 @@ to be:
|
||||
FROM mydhacct/evennia:latest
|
||||
```
|
||||
|
||||
Note: From this point, you can also use the `docker tag` command to set a specific tag on your image
|
||||
and/or upload it into Docker Hub under your account.
|
||||
|
||||
Note: From this point, you can also use the `docker tag` command to set a specific tag on your image and/or upload it into Docker Hub under your account.
|
||||
5. At this point, build your game using the same `docker build` command as usual. Change your
|
||||
working directory to be your game directory and run
|
||||
|
||||
@ -248,10 +207,7 @@ docker build -t mydhaccountt/mygame .
|
||||
|
||||
## Additional Creature Comforts
|
||||
|
||||
The Docker ecosystem includes a tool called `docker-compose`, which can orchestrate complex multi-
|
||||
container applications, or in our case, store the default port and terminal parameters that we want
|
||||
specified every time we run our container. A sample `docker-compose.yml` file to run a containerized
|
||||
Evennia game in development might look like this:
|
||||
The Docker ecosystem includes a tool called `docker-compose`, which can orchestrate complex multi- container applications, or in our case, store the default port and terminal parameters that we want specified every time we run our container. A sample `docker-compose.yml` file to run a containerized Evennia game in development might look like this:
|
||||
```
|
||||
version: '2'
|
||||
|
||||
@ -274,8 +230,4 @@ docker-compose up
|
||||
For more information about `docker-compose`, see [Getting Started with docker-
|
||||
compose](https://docs.docker.com/compose/gettingstarted/).
|
||||
|
||||
> Note that with this setup you lose the `--user $UID` option. The problem is that the variable
|
||||
`UID` is not available inside the configuration file `docker-compose.yml`. A workaround is to
|
||||
hardcode your user and group id. In a terminal run `echo $UID:$GID` and if for example you get
|
||||
`1000:1000` you can add to `docker-compose.yml` a line `user: 1000:1000` just below the `image: ...`
|
||||
line.
|
||||
> Note that with this setup you lose the `--user $UID` option. The problem is that the variable `UID` is not available inside the configuration file `docker-compose.yml`. A workaround is to hardcode your user and group id. In a terminal run `echo $UID:$GID` and if for example you get `1000:1000` you can add to `docker-compose.yml` a line `user: 1000:1000` just below the `image: ...` line.
|
||||
@ -35,6 +35,28 @@ Evennia should now be running and you can connect to it by pointing a web browse
|
||||
`http://localhost:4001` or a MUD telnet client to `localhost:4000` (use `127.0.0.1` if your OS does
|
||||
not recognize `localhost`).
|
||||
|
||||
## Virtualenv
|
||||
|
||||
A Python [virtual environment](https://docs.python.org/3/library/venv.html) allows you to install Evennia in its own little folder, separate from the rest of the system. You also won't need any extra permissions. It's optional to use a virtualenv, but it's highly recommended. Python supports this natively:
|
||||
|
||||
python3.11 -m venv evenv
|
||||
|
||||
This will create a new folder `evenv` in your current directory.
|
||||
Activate it like this:
|
||||
|
||||
`source evenv/bin/activate` (Linux, Mac)
|
||||
`evenv\Scripts\activate` (Windows)
|
||||
`.\evenv\scripts\activate` (Windows with PS Shell, Git Bash etc)
|
||||
|
||||
The text `(evenv)` should appear next to your prompt to show that the virtual
|
||||
environment is active. You _don't_ need to actually be in or near the `evenv` folder for
|
||||
the environment to be active.
|
||||
|
||||
> Remember that you need to re-activate the virtualenv like this *every time* you
|
||||
> start a new terminal/console to get access to the Python packages (notably the
|
||||
> important `evennia` program) you installed in the virtualenv!
|
||||
|
||||
|
||||
## Linux Install
|
||||
|
||||
For Debian-derived systems (like Ubuntu, Mint etc), start a terminal and
|
||||
@ -59,42 +81,18 @@ Next we fetch Evennia itself:
|
||||
git clone https://github.com/evennia/evennia.git
|
||||
```
|
||||
A new folder `evennia` will appear containing the Evennia library. This only
|
||||
contains the source code though, it is not *installed* yet. To isolate the
|
||||
Evennia install and its dependencies from the rest of the system, it is good
|
||||
Python practice to install into a _virtualenv_. If you are unsure about what a
|
||||
virtualenv is and why it's useful, see the [Glossary entry on
|
||||
virtualenv](../Glossary.md#virtualenv).
|
||||
contains the source code though, it is not *installed* yet.
|
||||
|
||||
```
|
||||
python3.10 -m venv evenv
|
||||
```
|
||||
At this point it's now optional but recommended that you initialize and activate a [virtualenv](#virtualenv).
|
||||
|
||||
A new folder `evenv` will appear (we could have called it anything). This
|
||||
folder will hold a self-contained setup of Python packages without interfering
|
||||
with default Python packages on your system (or the Linux distro lagging behind
|
||||
on Python package versions). It will also always use the right version of Python.
|
||||
Activate the virtualenv:
|
||||
|
||||
```
|
||||
source evenv/bin/activate
|
||||
```
|
||||
|
||||
The text `(evenv)` should appear next to your prompt to show that the virtual
|
||||
environment is active.
|
||||
|
||||
> Remember that you need to activate the virtualenv like this *every time* you
|
||||
> start a new terminal to get access to the Python packages (notably the
|
||||
> important `evennia` program) we are about to install.
|
||||
|
||||
Next, install Evennia into your active virtualenv. Make sure you are standing
|
||||
at the top of your mud directory tree (so you see the `evennia/` and `evenv/`
|
||||
folders) and run
|
||||
Next, install Evennia (system-wide, or into your active virtualenv). Make sure you are standing
|
||||
at the top of your mud directory tree (so you see the `evennia/` folder, and likely the `evenv` virtualenv folder) and do
|
||||
|
||||
```
|
||||
pip install -e evennia
|
||||
```
|
||||
|
||||
Test that you can run the `evennia` command everywhere while your virtualenv (evenv) is active.
|
||||
Test that you can run the `evennia` command.
|
||||
|
||||
Next you can continue initializing your game from the regular [Installation instructions](./Installation.md).
|
||||
|
||||
@ -107,9 +105,8 @@ terminal](https://blog.teamtreehouse.com/introduction-to-the-mac-os-x-command-li
|
||||
if you are unsure how it works.
|
||||
|
||||
* Python should already be installed but you must make sure it's a high enough version - go for
|
||||
3.10.
|
||||
([This](https://docs.python-guide.org/en/latest/starting/install/osx/) discusses
|
||||
how you may upgrade it).
|
||||
3.11.
|
||||
([This](https://docs.python-guide.org/en/latest/starting/install/osx/) discusses how you may upgrade it).
|
||||
* GIT can be obtained with
|
||||
[git-osx-installer](https://code.google.com/p/git-osx-installer/) or via MacPorts [as described
|
||||
here](https://git-scm.com/book/en/Getting-Started-Installing-Git#Installing-on-Mac).
|
||||
@ -132,32 +129,13 @@ git clone https://github.com/evennia/evennia.git
|
||||
```
|
||||
|
||||
A new folder `evennia` will appear containing the Evennia library. This only
|
||||
contains the source code though, it is not *installed* yet. To isolate the
|
||||
Evennia install and its dependencies from the rest of the system, it is good
|
||||
Python practice to install into a _virtualenv_. If you are unsure about what a
|
||||
virtualenv is and why it's useful, see the [Glossary entry on virtualenv](../Glossary.md#virtualenv).
|
||||
contains the source code though, it is not *installed* yet.
|
||||
|
||||
```
|
||||
python3.10 -m venv evenv
|
||||
```
|
||||
A new folder `evenv` will appear (we could have called it anything). This
|
||||
folder will hold a self-contained setup of Python packages without interfering
|
||||
with default Python packages on your system. Activate the virtualenv:
|
||||
At this point it's now optional but recommended that you initialize and activate a [virtualenv](#virtualenv).
|
||||
|
||||
```
|
||||
source evenv/bin/activate
|
||||
```
|
||||
|
||||
The text `(evenv)` should appear next to your prompt to show the virtual
|
||||
environment is active.
|
||||
|
||||
> Remember that you need to activate the virtualenv like this *every time* you
|
||||
> start a new terminal to get access to the Python packages (notably the
|
||||
> important `evennia` program) we are about to install.
|
||||
|
||||
Next, install Evennia into your active virtualenv. Make sure you are standing
|
||||
at the top of your mud directory tree (so you see the `evennia/` and `evenv/`
|
||||
folders) and run
|
||||
Next, install Evennia (system-wide, or into your active virtualenv). Make sure you are standing
|
||||
at the top of your mud directory tree (so you see the `evennia/`, and likely the `evenv` virtualenv
|
||||
folder) and do
|
||||
|
||||
```
|
||||
pip install --upgrade pip # Old pip versions may be an issue on Mac.
|
||||
@ -165,42 +143,29 @@ pip install --upgrade setuptools # Ditto concerning Mac issues.
|
||||
pip install -e evennia
|
||||
```
|
||||
|
||||
Test that you can run the `evennia` command everywhere while your virtualenv (evenv) is active.
|
||||
Test that you can run the `evennia` command.
|
||||
|
||||
Next you can continue initializing your game from the regular [Installation instructions](./Installation.md).
|
||||
|
||||
## Windows Install
|
||||
|
||||
> If you are running Windows10, consider using the _Windows Subsystem for Linux_
|
||||
> ([WSL](https://en.wikipedia.org/wiki/Windows_Subsystem_for_Linux)) instead.
|
||||
> Just set up WSL with an Ubuntu image and follow the Linux install instructions above.
|
||||
> ([WSL](https://en.wikipedia.org/wiki/Windows_Subsystem_for_Linux)) instead. Just set up WSL with an Ubuntu image and follow the Linux install instructions above.
|
||||
|
||||
The Evennia server itself is a command line program. In the Windows launch
|
||||
menu, start *All Programs -> Accessories -> command prompt* and you will get
|
||||
the Windows command line interface. Here is [one of many tutorials on using the Windows command
|
||||
line](https://www.bleepingcomputer.com/tutorials/windows-command-prompt-introduction/)
|
||||
if you are unfamiliar with it.
|
||||
the Windows command line interface. Here is [one of many tutorials on using the Windows command line](https://www.bleepingcomputer.com/tutorials/windows-command-prompt-introduction/) if you are unfamiliar with it.
|
||||
|
||||
* Install Python [from the Python homepage](https://www.python.org/downloads/windows/). You will
|
||||
need to be a
|
||||
Windows Administrator to install packages. Get Python any version of Python **3.10**, usually
|
||||
* Install Python [from the Python homepage](https://www.python.org/downloads/windows/). You will need to be a
|
||||
Windows Administrator to install packages. Get Python **3.11**, usually
|
||||
the 64-bit version (although it doesn't matter too much). **When installing, make sure
|
||||
to check-mark *all* install options, especially the one about making Python
|
||||
available on the path (you may have to scroll to see it)**. This allows you to
|
||||
just write `python` in any console without first finding where the `python`
|
||||
just write `python` (or possibly `py`) in any console without first finding where the `python`
|
||||
program actually sits on your hard drive.
|
||||
* You need to also get [GIT](https://git-scm.com/downloads) and install it. You
|
||||
can use the default install options but when you get asked to "Adjust your PATH
|
||||
environment", you should select the second option "Use Git from the Windows
|
||||
Command Prompt", which gives you more freedom as to where you can use the
|
||||
program.
|
||||
* Finally you must install the [Microsoft Visual C++ compiler for
|
||||
Python](https://aka.ms/vs/16/release/vs_buildtools.exe). Download and run the linked installer and
|
||||
install the C++ tools. Keep all the defaults. Allow the install of the "Win10 SDK", even if you are
|
||||
on Win7 (not tested on older Windows versions). If you later have issues with installing Evennia due
|
||||
to a failure to build the "Twisted wheels", this is where you are missing things.
|
||||
* You *may* need the [pypiwin32](https://pypi.python.org/pypi/pypiwin32) Python headers. Install
|
||||
these only if you have issues.
|
||||
* You need to also get [GIT](https://git-scm.com/downloads) and install it. You can use the default install options but when you get asked to "Adjust your PATH environment", you should select the second option "Use Git from the Windows Command Prompt", which gives you more freedom as to where you can use the program.
|
||||
* Finally you must install the [Microsoft Visual C++ compiler for Python](https://aka.ms/vs/16/release/vs_buildtools.exe). Download and run the linked installer and install the C++ tools. Keep all the defaults. Allow the install of the "Win10 SDK", even if you are on Win7 (not tested on older Windows versions). If you later have issues with installing Evennia due to a failure to build the "Twisted wheels", this is where you are missing things.
|
||||
* You *may* need the [pypiwin32](https://pypi.python.org/pypi/pypiwin32) Python headers. Install these only if you have issues.
|
||||
|
||||
You can install Evennia wherever you want. `cd` to that location and create a
|
||||
new folder for all your Evennia development (let's call it `muddev`).
|
||||
@ -220,35 +185,12 @@ git clone https://github.com/evennia/evennia.git
|
||||
```
|
||||
|
||||
A new folder `evennia` will appear containing the Evennia library. This only
|
||||
contains the source code though, it is not *installed* yet. To isolate the
|
||||
Evennia install and its dependencies from the rest of the system, it is good
|
||||
Python practice to install into a _virtualenv_. If you are unsure about what a
|
||||
virtualenv is and why it's useful, see the [Glossary entry on virtualenv](../Glossary.md#virtualenv).
|
||||
contains the source code though, it is not *installed* yet.
|
||||
|
||||
```
|
||||
python3.10 -m venv evenv
|
||||
```
|
||||
A new folder `evenv` will appear (we could have called it anything). This
|
||||
folder will hold a self-contained setup of Python packages without interfering
|
||||
with default Python packages on your system. Activate the virtualenv:
|
||||
At this point it's optional but recommended that you initialize and activate a [virtualenv](#virtualenv).
|
||||
|
||||
```
|
||||
# If you are using a standard command prompt, you can use the following:
|
||||
evenv\scripts\activate.bat
|
||||
|
||||
# If you are using a PS Shell, Git Bash, or other, you can use the following:
|
||||
.\evenv\scripts\activate
|
||||
```
|
||||
The text `(evenv)` should appear next to your prompt to show the virtual
|
||||
environment is active.
|
||||
|
||||
> Remember that you need to activate the virtualenv like this *every time* you
|
||||
> start a new console window if you want to get access to the Python packages
|
||||
> (notably the important `evennia` program) we are about to install.
|
||||
|
||||
Next, install Evennia into your active virtualenv. Make sure you are standing
|
||||
at the top of your mud directory tree (so you see the `evennia` and `evenv`
|
||||
folders when you use the `dir` command) and run
|
||||
Next, install Evennia (system wide, or into the virtualenv). Make sure you are standing
|
||||
at the top of your mud directory tree (so you see `evennia`, and likely the `evenv` virtualenv folder when running the `dir` command). Then do:
|
||||
|
||||
```
|
||||
pip install -e evennia
|
||||
|
||||
@ -14,26 +14,19 @@ everything in the following sections.
|
||||
- Windows (Win7, Win8, Win10, Win11)
|
||||
- Mac OSX (>10.5 recommended)
|
||||
|
||||
- [Python](https://www.python.org) (v3.9 and 3.10 are tested)
|
||||
- [virtualenv](https://pypi.python.org/pypi/virtualenv) for making isolated
|
||||
Python environments. Installed with `pip install virtualenv`.
|
||||
- [Python](https://www.python.org) (v3.9, 3.10 and 3.11 are tested)
|
||||
- [Twisted](https://twistedmatrix.com) (v22.0+)
|
||||
- [ZopeInterface](https://www.zope.org/Products/ZopeInterface) (v3.0+) - usually included in
|
||||
Twisted packages
|
||||
- [ZopeInterface](https://www.zope.org/Products/ZopeInterface) (v3.0+) - usually included in Twisted packages
|
||||
- Linux/Mac users may need the `gcc` and `python-dev` packages or equivalent.
|
||||
- Windows users need [MS Visual C++](https://aka.ms/vs/16/release/vs_buildtools.exe) and *maybe*
|
||||
[pypiwin32](https://pypi.python.org/pypi/pypiwin32).
|
||||
- [Django](https://www.djangoproject.com) (v4.0.1+), be warned that latest dev
|
||||
version is usually untested with Evennia.
|
||||
- Windows users need [MS Visual C++](https://aka.ms/vs/16/release/vs_buildtools.exe) and *maybe* [pypiwin32](https://pypi.python.org/pypi/pypiwin32).
|
||||
- [Django](https://www.djangoproject.com) (v4.2+), be warned that latest dev version is usually untested with Evennia.
|
||||
- [GIT](https://git-scm.com/) - version control software used if you want to install the sources
|
||||
(but also useful to track your own code) - Mac users can use the
|
||||
[git-osx-installer](https://code.google.com/p/git-osx-installer/) or the
|
||||
[MacPorts version](https://git-scm.com/book/en/Getting-Started-Installing-Git#Installing-on-Mac).
|
||||
(but also useful to track your own code)
|
||||
- Mac users can use the [git-osx-installer](https://code.google.com/p/git-osx-installer/) or the [MacPorts version](https://git-scm.com/book/en/Getting-Started-Installing-Git#Installing-on-Mac).
|
||||
|
||||
## Confusion of location (GIT installation)
|
||||
|
||||
It's common to be confused and install Evennia in the wrong location. After following the
|
||||
[git install](./Installation-Git.md) instructions, the folder structure should look like this:
|
||||
When doing the [Git installation](Installation-Git), some may be confused and install Evennia in the wrong location. After following the instructions (and using a virtualenv), the folder structure should look like this:
|
||||
|
||||
```
|
||||
muddev/
|
||||
@ -47,15 +40,14 @@ is `mygame/server/conf/settings.py` and the _parent_ setting file is `evennia/ev
|
||||
|
||||
## Virtualenv setup fails
|
||||
|
||||
When doing the `python3.10 -m venv evenv` step, some users report getting an error; something like:
|
||||
When doing the `python3.11 -m venv evenv` step, some users report getting an error; something like:
|
||||
|
||||
Error: Command '['evenv', '-Im', 'ensurepip', '--upgrade', '--default-pip']'
|
||||
returned non-zero exit status 1
|
||||
|
||||
You can solve this by installing the `python3.10-venv` package or equivalent for your OS. Alternatively
|
||||
you can bootstrap it in this way:
|
||||
You can solve this by installing the `python3.11-venv` package or equivalent for your OS. Alternatively you can bootstrap it in this way:
|
||||
|
||||
python3.10 -m --without-pip evenv
|
||||
python3.11 -m --without-pip evenv
|
||||
|
||||
This should set up the virtualenv without `pip`. Activate the new virtualenv and then install pip from within it:
|
||||
|
||||
@ -74,64 +66,34 @@ If `localhost` doesn't work when trying to connect to your local game, try `127.
|
||||
## Linux Troubleshooting
|
||||
|
||||
- If you get an error when installing Evennia (especially with lines mentioning
|
||||
failing to include `Python.h`) then try `sudo apt-get install python3-setuptools python3-dev`.
|
||||
Once installed, run `pip install -e evennia` again.
|
||||
failing to include `Python.h`) then try `sudo apt-get install python3-setuptools python3-dev`. Once installed, run `pip install -e evennia` again.
|
||||
- When doing a [git install](./Installation-Git.md), some not-updated Linux distributions may give errors
|
||||
about a too-old `setuptools` or missing `functools`. If so, update your environment
|
||||
with `pip install --upgrade pip wheel setuptools`. Then try `pip install -e evennia` again.
|
||||
- One user reported a rare issue on Ubuntu 16 is an install error on installing Twisted; `Command
|
||||
"python setup.py egg_info" failed with error code 1 in /tmp/pip-build-vnIFTg/twisted/` with errors
|
||||
like `distutils.errors.DistutilsError: Could not find suitable distribution for
|
||||
Requirement.parse('incremental>=16.10.1')`. This appears possible to solve by simply updating Ubuntu
|
||||
with `sudo apt-get update && sudo apt-get dist-upgrade`.
|
||||
- One user reported a rare issue on Ubuntu 16 is an install error on installing Twisted; `Command "python setup.py egg_info" failed with error code 1 in /tmp/pip-build-vnIFTg/twisted/` with errors like `distutils.errors.DistutilsError: Could not find suitable distribution for Requirement.parse('incremental>=16.10.1')`. This appears possible to solve by simply updating Ubuntu with `sudo apt-get update && sudo apt-get dist-upgrade`.
|
||||
- Users of Fedora (notably Fedora 24) has reported a `gcc` error saying the directory
|
||||
`/usr/lib/rpm/redhat/redhat-hardened-cc1` is missing, despite `gcc` itself being installed. [The
|
||||
confirmed work-around](https://gist.github.com/yograterol/99c8e123afecc828cb8c) seems to be to
|
||||
install the `redhat-rpm-config` package with e.g. `sudo dnf install redhat-rpm-config`.
|
||||
confirmed work-around](https://gist.github.com/yograterol/99c8e123afecc828cb8c) seems to be to install the `redhat-rpm-config` package with e.g. `sudo dnf install redhat-rpm-config`.
|
||||
- Some users trying to set up a virtualenv on an NTFS filesystem find that it fails due to issues
|
||||
with symlinks not being supported. Answer is to not use NTFS (seriously, why would you do that to
|
||||
yourself?)
|
||||
with symlinks not being supported. Answer is to not use NTFS (seriously, why would you do that to yourself?)
|
||||
|
||||
## Mac Troubleshooting
|
||||
|
||||
- Mac users have reported a critical `MemoryError` when trying to start Evennia on Mac with a Python
|
||||
version below `2.7.12`. If you get this error, update to the latest XCode and Python2 version.
|
||||
- Some Mac users have reported not being able to connect to `localhost` (i.e. your own computer). If
|
||||
so, try to connect to `127.0.0.1` instead, which is the same thing. Use port 4000 from mud clients
|
||||
and port 4001 from the web browser as usual.
|
||||
- Some Mac users have reported not being able to connect to `localhost` (i.e. your own computer). If so, try to connect to `127.0.0.1` instead, which is the same thing. Use port 4000 from mud clients and port 4001 from the web browser as usual.
|
||||
|
||||
## Windows Troubleshooting
|
||||
|
||||
- Install Python [from the Python homepage](https://www.python.org/downloads/windows/). You will
|
||||
need to be a Windows Administrator to install packages.
|
||||
- When installing Python, make sure to check-mark *all* install options, especially the one about making Python
|
||||
available on the path (you may have to scroll to see it). This allows you to
|
||||
just write `python` in any console without first finding where the `python`
|
||||
program actually sits on your hard drive.
|
||||
- If you get a `command not found` when trying to run the `evennia` program after installation, try closing the
|
||||
Console and starting it again (remember to re-activate the virtualenv!). Sometimes Windows is not updating
|
||||
its environment properly.
|
||||
- Install Python [from the Python homepage](https://www.python.org/downloads/windows/). You will need to be a Windows Administrator to install packages.
|
||||
- When installing Python, make sure to check-mark *all* install options, especially the one about making Python available on the path (you may have to scroll to see it). This allows you to
|
||||
just write `python` in any console without first finding where the `python` program actually sits on your hard drive.
|
||||
- If you get a `command not found` when trying to run the `evennia` program after installation, try closing the Console and starting it again (remember to re-activate the virtualenv if you use one!). Sometimes Windows is not updating its environment properly and `evennia` will be available only in the new console.
|
||||
- If you installed Python but the `python` command is not available (even in a new console), then
|
||||
you might have missed installing Python on the path. In the Windows Python installer you get a list
|
||||
of options for what to install. Most or all options are pre-checked except this one, and you may
|
||||
even have to scroll down to see it. Reinstall Python and make sure it's checked.
|
||||
you might have missed installing Python on the path. In the Windows Python installer you get a list of options for what to install. Most or all options are pre-checked except this one, and you may even have to scroll down to see it. Reinstall Python and make sure it's checked.
|
||||
- If your MUD client cannot connect to `localhost:4000`, try the equivalent `127.0.0.1:4000`
|
||||
instead. Some MUD clients on Windows does not appear to understand the alias `localhost`.
|
||||
- Some Windows users get an error installing the Twisted 'wheel'. A wheel is a pre-compiled binary
|
||||
package for Python. A common reason for this error is that you are using a 32-bit version of Python,
|
||||
but Twisted has not yet uploaded the latest 32-bit wheel. Easiest way to fix this is to install a
|
||||
slightly older Twisted version. So if, say, version `22.1` failed, install `22.0` manually with `pip
|
||||
install twisted==22.0`. Alternatively you could check that you are using the 64-bit version of Python
|
||||
and uninstall any 32bit one. If so, you must then `deactivate` the virtualenv, delete the `evenv` folder
|
||||
and recreate it anew with your new Python.
|
||||
package for Python. A common reason for this error is that you are using a 32-bit version of Python, but Twisted has not yet uploaded the latest 32-bit wheel. Easiest way to fix this is to install a slightly older Twisted version. So if, say, version `22.1` failed, install `22.0` manually with `pip install twisted==22.0`. Alternatively you could check that you are using the 64-bit version of Python and uninstall any 32bit one. If so, you must then `deactivate` the virtualenv, delete the `evenv` folder and recreate it anew with your new Python.
|
||||
- If your server won't start, with no error messages (and no log files at all when starting from
|
||||
scratch), try to start with `evennia ipstart` instead. If you then see an error about `system cannot
|
||||
find the path specified`, it may be that the file `evennia\evennia\server\twistd.bat` has the wrong
|
||||
path to the `twistd` executable. This file is auto-generated, so try to delete it and then run
|
||||
`evennia start` to rebuild it and see if it works. If it still doesn't work you need to open it in a
|
||||
text editor like Notepad. It's just one line containing the path to the `twistd.exe` executable as
|
||||
determined by Evennia. If you installed Twisted in a non-standard location this might be wrong and
|
||||
you should update the line to the real location.
|
||||
scratch), try to start with `evennia ipstart` instead. If you then see an error about `system cannot find the path specified`, it may be that the file `evennia\evennia\server\twistd.bat` has the wrong path to the `twistd` executable. This file is auto-generated, so try to delete it and then run `evennia start` to rebuild it and see if it works. If it still doesn't work you need to open it in a text editor like Notepad. It's just one line containing the path to the `twistd.exe` executable as determined by Evennia. If you installed Twisted in a non-standard location this might be wrong and you should update the line to the real location.
|
||||
- Some users have reported issues with Windows WSL and anti-virus software during Evennia
|
||||
development. Timeout errors and the inability to run `evennia connections` may be due to your anti-
|
||||
virus software interfering. Try disabling or changing your anti-virus software settings.
|
||||
development. Timeout errors and the inability to run `evennia connections` may be due to your anti-virus software interfering. Try disabling or changing your anti-virus software settings.
|
||||
|
||||
@ -1,45 +1,44 @@
|
||||
# Upgrading an existing installation
|
||||
|
||||
This is relevant to you already having code in an older Evennia version. If you are new, or don't have much code yet, it may be easier to just start fresh with the [Installation](Installation) instructions and copy
|
||||
over things manually.
|
||||
|
||||
## Evennia v0.9.5 to 1.0
|
||||
|
||||
### Upgrading the Evennia library
|
||||
|
||||
Prior to 1.0, all Evennia installs were [Git-installs](./Installation-Git.md). These instructions
|
||||
assume that you have a cloned `evennia` repo and use a virtualenv (best practices).
|
||||
|
||||
- Make sure to stop Evennia 0.9.5 entirely with `evennia stop`.
|
||||
- `deactivate` to leave your active virtualenv.
|
||||
- Make a _backup_ of your entire `mygame` folder, just to be sure!
|
||||
- Delete the old `evenv` folder, or rename it (in case you want to keep using 0.9.5 for a while).
|
||||
- Install Python 3.10 (recommended) or 3.9. Follow the [Git-installation](./Installation-Git.md) for your OS if needed.
|
||||
- If using virtualenv, make a _new_ one with `python3.10 -m venv evenv`, then activate with `source evenv/bin/activate`
|
||||
(linux/mac) or `\evenv\Script\activate` (windows)
|
||||
- `cd` into your `evennia/` folder (you want to see the `docs/`, `bin/` directories as well as a nested `evennia/` folder)
|
||||
- **Prior to 1.0 release only** - do `git checkout develop` to switch to the develop branch. After release, this will
|
||||
be found on the default master branch.
|
||||
- Install Python 3.11 (recommended). Follow the [Git-installation](./Installation-Git.md) for your OS if needed.
|
||||
- Delete the old virtualenv `evenv` folder, or rename it (in case you want to keep using 0.9.5 for a while).
|
||||
- Make _new_ `evenv` virtualenv (see the [virtualenv instructions](Installation-Git#virtualenv) for help)
|
||||
- `cd` into your `evennia/` root folder (you want to see the `docs/` and `bin/` directories as well as a nested `evennia/` folder)
|
||||
- `git pull`
|
||||
- `pip install -e .`
|
||||
- If you want the optional extra libs, do `pip install -r requirements_extra.txt`.
|
||||
- If you want the optional extra libs (needed by some contribs), do `pip install -e .[extra]`
|
||||
- Test that you can run the `evennia` command.
|
||||
|
||||
### Upgrading your game dir
|
||||
|
||||
If you don't have anything you want to keep in your existing game dir, you can just start a new onew
|
||||
using the normal [install instructions](./Installation.md). If you want to keep/convert your existing
|
||||
game dir, continue below.
|
||||
|
||||
- First, make a backup of your exising game dir! If you use version control, make sure to commit your current state.
|
||||
- `cd` to your existing 0.9.5-based game folder (like `mygame`.)
|
||||
- If you have changed `mygame/web`, _rename_ the folder to `web_0.9.5`. If you didn't change anything (or don't have
|
||||
anything you want to keep), you can _delete_ it entirely.
|
||||
- Copy `evennia/evennia/game_template/web` to `mygame/` (e.g. using `cp -Rf` or a file manager). This new `web` folder
|
||||
replaces the old one and has a very different structure.
|
||||
- If you have changed `mygame/web`, _rename_ the folder to `web_0.9.5`. If you didn't change anything (or don't have anything you want to keep), you can _delete_ it entirely.
|
||||
- Copy `evennia/evennia/game_template/web` to `mygame/` (e.g. using `cp -Rf` or a file manager). This new `web` folder _replaces the old one_ and has a very different structure.
|
||||
- It's possible you need to replace/comment out import and calls to the deprecated
|
||||
[`django.conf.urls`](https://docs.djangoproject.com/en/3.2/ref/urls/#url). The new way to call it is
|
||||
[available here](https://docs.djangoproject.com/en/4.0/ref/urls/#django.urls.re_path).
|
||||
[`django.conf.urls`](https://docs.djangoproject.com/en/3.2/ref/urls/#url). The new way to call it is [available here](https://docs.djangoproject.com/en/4.0/ref/urls/#django.urls.re_path).
|
||||
- Run `evennia migrate`
|
||||
- Run `evennia start`
|
||||
|
||||
If you made extensive work in your game dir, you may well find that you need to do some (hopefully minor)
|
||||
changes to your code before it will start with Evennia 1.0. Some important points:
|
||||
If you made extensive work in your game dir, you may well find that you need to do some (hopefully minor) changes to your code before it will start with Evennia 1.0. Some important points:
|
||||
|
||||
- The `evennia/contrib/` folder changed structure - there are now categorized sub-folders, so you have to update
|
||||
your imports.
|
||||
- The `evennia/contrib/` folder changed structure - there are now categorized sub-folders, so you have to update your imports.
|
||||
- Any `web` changes need to be moved back from your backup into the new structure of `web/` manually.
|
||||
- See the [Evennia 1.0 Changelog](../Coding/Changelog.md) for all changes.
|
||||
|
||||
@ -1,31 +1,33 @@
|
||||
# Installation
|
||||
|
||||
```{warning}
|
||||
pip install evennia is not yet available in develop branch. Use the [git installation](./Installation-Git.md).
|
||||
```
|
||||
```{important}
|
||||
If you are converting an existing game from a previous version, [see here](./Installation-Upgrade.md).
|
||||
If you are converting an existing game from a previous Evennia version, [see here](./Installation-Upgrade.md).
|
||||
```
|
||||
|
||||
Installing Evennia doesn't make anything visible online. Apart from installation and updating, you can develop your game without any internet connection.
|
||||
|
||||
- Evennia requires [Python](https://www.python.org/downloads/) 3.9 or 3.10.
|
||||
- Using a [Python virtualenv](../Glossary.md#virtualenv) is highly recommended in order to keep your
|
||||
- Evennia supports [Python](https://www.python.org/downloads/) 3.9, 3.10 or 3.11.
|
||||
- Using a [Python virtualenv](Installation-Git#virtualenv) is optional, but _highly recommended_ in order to keep your
|
||||
Evennia installation independent from the system libraries.
|
||||
- Don't install Evennia as
|
||||
administrator or superuser.
|
||||
- Don't install Evennia as administrator or superuser.
|
||||
- If you run into trouble, see [installation troubleshooting](Installation-Troubleshooting).
|
||||
|
||||
Evennia is managed from the terminal (console/CMD on Windows). If you have a suitable Python installed, you can install with
|
||||
Evennia is managed from the terminal (console/CMD on Windows). If you have a suitable Python installed, you can install it with
|
||||
|
||||
pip install evennia
|
||||
|
||||
Alternatively, you can [install Evennia from github](./Installation-Git.md) or use [docker](./Installation-Docker.md).
|
||||
Optional: If you use a [contrib](Contribs) that warns you that it needs additional packages, you can
|
||||
install all extra dependencies with
|
||||
|
||||
Installing doesn't make anything visible online. Apart from installation and updating, you can develop your game without any internet connection.
|
||||
pip install evennia[extra]
|
||||
|
||||
To update Evennia later, do
|
||||
|
||||
pip install --upgrade evennia
|
||||
|
||||
Once installed, make sure the `evennia` command works. Use `evennia -h` for usage help. If you are using a virtualenv, make sure it's active whenever you need to use the `evennia` command.
|
||||
|
||||
> Check out [installation troubleshooting](./Installation-Troubleshooting.md) if you run into problems. Some
|
||||
users have also experimented with [installing Evennia on Android](./Installation-Android.md).
|
||||
> You can also [clone Evennia from github](./Installation-Git.md) or use [docker](./Installation-Docker.md). Some users have also experimented with [installing Evennia on Android](./Installation-Android.md).
|
||||
|
||||
## Initialize a new game
|
||||
|
||||
@ -82,13 +84,12 @@ or
|
||||
|
||||
evennia -l
|
||||
|
||||
Stop viewing the log by pressing `Ctrl-C` (`Cmd-C` for Mac).
|
||||
|
||||
You can start viewing the log immediately when running `evennia` commands, such as
|
||||
|
||||
You can start viewing the log immediately by adding `-l/--log` to `evennia` commands, such as
|
||||
|
||||
evennia start -l
|
||||
|
||||
To exit the log tailing, enter `Ctrl-C` (`Cmd-C` for Mac). This will not affect the server.
|
||||
|
||||
## Server configuration
|
||||
|
||||
@ -96,7 +97,7 @@ The server configuration file is `mygame/server/settings.py`. It's empty by defa
|
||||
|
||||
## Register with the Evennia Game Index (optional)
|
||||
|
||||
You can optionally let the world know that you are working on a new Evennia-based game by
|
||||
You can let the world know that you are working on a new Evennia-based game by
|
||||
registering your server with the _Evennia game index_. You don't have to be
|
||||
open for players to do this - you just mark your game as closed and "pre-alpha".
|
||||
|
||||
|
||||
114
pyproject.toml
114
pyproject.toml
@ -1,6 +1,112 @@
|
||||
[build-system]
|
||||
requires = ["setuptools>40.8.0", "wheel"]
|
||||
build-backend = "setuptools.build_meta:__legacy__"
|
||||
requires = ["setuptools>=61.0"]
|
||||
build-backend = "setuptools.build_meta"
|
||||
|
||||
[project]
|
||||
name = "evennia"
|
||||
version = "1.0rc3"
|
||||
maintainers = [
|
||||
{ name="Griatch", email="griatch@gmail.com" },
|
||||
]
|
||||
description = "A full-featured toolkit and server for text-based multiplayer games (MUDs, MU*)."
|
||||
requires-python = ">=3.9"
|
||||
readme = { file="README.md", content-type="text/markdown" }
|
||||
license = { text="BSD" }
|
||||
keywords = [
|
||||
"MUD", "MUSH", "MUX", "MMO", "text-only", "multiplayer", "online", "rpg", "game", "engine",
|
||||
"framework", "text", "adventure", "telnet", "websocket", "blind", "accessible", "ascii",
|
||||
"utf-8", "terminal", "online", "server", "beginner", "tutorials"
|
||||
]
|
||||
classifiers = [
|
||||
"Programming Language :: Python :: 3 :: Only",
|
||||
"Programming Language :: Python :: 3.9",
|
||||
"Programming Language :: JavaScript",
|
||||
"Development Status :: 5 - Production/Stable",
|
||||
"License :: OSI Approved :: BSD License",
|
||||
"Environment :: Console",
|
||||
"Environment :: Web Environment",
|
||||
"Framework :: Django",
|
||||
"Framework :: Twisted",
|
||||
"Intended Audience :: Developers",
|
||||
"Intended Audience :: Education",
|
||||
"Operating System :: MacOS",
|
||||
"Operating System :: Microsoft :: Windows",
|
||||
"Operating System :: POSIX :: Linux",
|
||||
"Topic :: Database",
|
||||
"Topic :: Education",
|
||||
"Topic :: Games/Entertainment :: Multi-User Dungeons (MUD)",
|
||||
"Topic :: Games/Entertainment :: Puzzle Games",
|
||||
"Topic :: Games/Entertainment :: Role-Playing",
|
||||
"Topic :: Games/Entertainment :: Simulation",
|
||||
"Topic :: Software Development :: Libraries :: Application Frameworks",
|
||||
"Topic :: Internet :: WWW/HTTP :: WSGI :: Server"
|
||||
]
|
||||
dependencies = [
|
||||
# core dependencies
|
||||
"django >= 4.1.3, < 4.2",
|
||||
"twisted >= 22.10, < 23",
|
||||
"pytz >= 2022.6",
|
||||
"djangorestframework >= 3.14, < 3.15",
|
||||
"pyyaml >= 6.0",
|
||||
"django-filter == 2.4",
|
||||
"django-sekizai == 2.0.0",
|
||||
"inflect >= 5.2.0",
|
||||
"autobahn >= 20.7.1, < 21.0.0",
|
||||
"lunr == 0.6.0",
|
||||
"simpleeval <= 1.0",
|
||||
"uritemplate == 4.1.1",
|
||||
"Jinja2 < 3.1",
|
||||
"tzdata >= 2022.6",
|
||||
# for unit tests and code formatting
|
||||
"model_mommy >= 2.0",
|
||||
"anything ==0.2.1",
|
||||
"black >= 22.6",
|
||||
"isort >= 5.10",
|
||||
"parameterized ==0.8.1",
|
||||
]
|
||||
|
||||
[project.optional-dependencies]
|
||||
|
||||
extra = [
|
||||
# contrib optional dependencies
|
||||
# install with 'pip install evennia[extra]`
|
||||
|
||||
# crypto libraries for ssh support
|
||||
"cryptography >= 2.8",
|
||||
"pyasn1 >= 0.4.8",
|
||||
"bcrypt >= 3.1.7",
|
||||
|
||||
# Telnet-SSL support
|
||||
"pyopenssl >= 19.1",
|
||||
"service_identity >= 18.1.0",
|
||||
|
||||
# AWS storage contrib
|
||||
"boto3 >= 1.4.4",
|
||||
"botocore >= 1.15",
|
||||
|
||||
# Jupyter Notebook support
|
||||
"jupyter >= 1.0.0",
|
||||
"ipython >= 7.19.0",
|
||||
"django-extensions >= 3.1.0",
|
||||
|
||||
# xyzroom contrib
|
||||
"scipy == 1.9.3",
|
||||
|
||||
# Git contrib
|
||||
"gitpython >= 3.1.27"
|
||||
]
|
||||
|
||||
[project.urls]
|
||||
"Homepage" = "https://www.evennia.com"
|
||||
"Github" = "https://github.com/evennia/evennia"
|
||||
"Documentation" = "https://www.evennia.com/docs/latest/index.html"
|
||||
"Live Demo" = "https://demo.evennia.com/"
|
||||
"Forums" = "https://github.com/evennia/evennia/discussions"
|
||||
"Discord" = "https://discord.gg/AJJpcRUhtF"
|
||||
"Dev Blog" = "https://www.evennia.com/devblog/index.html"
|
||||
"Game Index" = "http://games.evennia.com"
|
||||
"Issue tracker" = "https://github.com/evennia/evennia/issues"
|
||||
"Patreon" = "https://www.patreon.com/griatch"
|
||||
|
||||
[tool.black]
|
||||
line-length = 100
|
||||
@ -21,7 +127,7 @@ exclude = '''
|
||||
| dist
|
||||
)/
|
||||
| migrations
|
||||
| docs
|
||||
|
||||
| docs
|
||||
|
||||
)
|
||||
'''
|
||||
|
||||
@ -1,34 +0,0 @@
|
||||
# Evennia dependencies
|
||||
|
||||
# general
|
||||
attrs >= 19.2.0
|
||||
django >= 4.1.3, < 4.2
|
||||
twisted >= 22.10, < 23
|
||||
pytz
|
||||
# djangorestframework >= 3.13.1, < 3.14
|
||||
djangorestframework >= 3.14, < 3.15
|
||||
pyyaml
|
||||
django-filter == 2.4
|
||||
django-sekizai == 2.0.0
|
||||
inflect >= 5.2.0
|
||||
autobahn >= 20.7.1, < 21.0.0
|
||||
lunr == 0.6.0
|
||||
simpleeval <= 1.0
|
||||
uritemplate == 4.1.1
|
||||
Jinja2 < 3.1
|
||||
tzdata
|
||||
|
||||
# try to resolve dependency issue in py3.7
|
||||
attrs >= 19.2.0
|
||||
|
||||
# testing and development
|
||||
model_mommy
|
||||
mock >= 1.0.1
|
||||
anything==0.2.1
|
||||
black >= 22.6
|
||||
isort >= 5.10
|
||||
wheel
|
||||
parameterized==0.8.1
|
||||
|
||||
# windows-specific
|
||||
pypiwin32;platform_system=="Windows"
|
||||
@ -1,27 +0,0 @@
|
||||
# Requirements for features not active in Evennia by default, but needed for
|
||||
# extra functionality and options.
|
||||
|
||||
|
||||
# Crypto libraries for SSH support
|
||||
cryptography >= 2.8
|
||||
pyasn1 >= 0.4.8
|
||||
bcrypt >= 3.1.7
|
||||
|
||||
# Library for Telnet-SSL support
|
||||
pyopenssl >= 19.1
|
||||
service_identity >= 18.1.0
|
||||
|
||||
# AWS-storage contrib
|
||||
boto3 >= 1.4.4
|
||||
botocore >= 1.15
|
||||
|
||||
# Jupyter Notebook support
|
||||
jupyter >= 1.0.0
|
||||
ipython >= 7.19.0
|
||||
django-extensions >= 3.1.0
|
||||
|
||||
# xyzroom contrib
|
||||
scipy == 1.9.3
|
||||
|
||||
# Git contrib
|
||||
gitpython >= 3.1.27
|
||||
100
setup.py
100
setup.py
@ -1,33 +1,23 @@
|
||||
"""
|
||||
Do custom actions during build/install step.
|
||||
|
||||
"""
|
||||
|
||||
import os
|
||||
import sys
|
||||
|
||||
from setuptools import find_packages, setup
|
||||
from setuptools import setup
|
||||
|
||||
os.chdir(os.path.dirname(os.path.realpath(__file__)))
|
||||
|
||||
VERSION_PATH = os.path.join("evennia", "VERSION.txt")
|
||||
OS_WINDOWS = os.name == "nt"
|
||||
|
||||
|
||||
def get_requirements():
|
||||
def get_evennia_executable():
|
||||
"""
|
||||
To update the requirements for Evennia, edit the requirements.txt file.
|
||||
"""
|
||||
with open("requirements.txt", "r") as f:
|
||||
req_lines = f.readlines()
|
||||
reqs = []
|
||||
for line in req_lines:
|
||||
# Avoid adding comments.
|
||||
line = line.split("#")[0].strip()
|
||||
if line:
|
||||
reqs.append(line)
|
||||
return reqs
|
||||
Called from build process.
|
||||
|
||||
|
||||
def get_scripts():
|
||||
"""
|
||||
Determine which executable scripts should be added. For Windows,
|
||||
this means creating a .bat file.
|
||||
|
||||
"""
|
||||
if OS_WINDOWS:
|
||||
batpath = os.path.join("bin", "windows", "evennia.bat")
|
||||
@ -39,17 +29,9 @@ def get_scripts():
|
||||
return [os.path.join("bin", "unix", "evennia")]
|
||||
|
||||
|
||||
def get_version():
|
||||
def get_all_files():
|
||||
"""
|
||||
When updating the Evennia package for release, remember to increment the
|
||||
version number in evennia/VERSION.txt
|
||||
"""
|
||||
return open(VERSION_PATH).read().strip()
|
||||
|
||||
|
||||
def package_data():
|
||||
"""
|
||||
By default, the distribution tools ignore all non-python files.
|
||||
By default, the distribution tools ignore all non-python files, such as VERSION.txt.
|
||||
|
||||
Make sure we get everything.
|
||||
"""
|
||||
@ -64,61 +46,5 @@ def package_data():
|
||||
return file_set
|
||||
|
||||
|
||||
# setup the package
|
||||
setup(
|
||||
name="evennia",
|
||||
version=get_version(),
|
||||
author="The Evennia community",
|
||||
maintainer="Griatch",
|
||||
url="http://www.evennia.com",
|
||||
description="A full-featured toolkit and server for text-based multiplayer games (MUDs, MU*).",
|
||||
license="BSD",
|
||||
long_description="""
|
||||
_Evennia_ is an open-source library and toolkit for building multi-player
|
||||
online text games (MUD, MUX, MUSH, MUCK and other MU*). You easily design
|
||||
your entire game using normal Python modules, letting Evennia handle the
|
||||
boring stuff all multiplayer games need. Apart from supporting traditional
|
||||
MUD clients, Evennia comes with both a HTML5 game web-client and a
|
||||
web-server out of the box.
|
||||
""",
|
||||
long_description_content_type="text/markdown",
|
||||
packages=find_packages(),
|
||||
scripts=get_scripts(),
|
||||
install_requires=get_requirements(),
|
||||
package_data={"": package_data()},
|
||||
zip_safe=False,
|
||||
classifiers=[
|
||||
"Programming Language :: Python :: 3 :: Only",
|
||||
"Programming Language :: Python :: 3.7",
|
||||
"Programming Language :: JavaScript",
|
||||
"Development Status :: 4 - Beta",
|
||||
"License :: OSI Approved :: BSD License",
|
||||
"Environment :: Console",
|
||||
"Environment :: Web Environment",
|
||||
"Framework :: Django",
|
||||
"Framework :: Django :: 2.2",
|
||||
"Framework :: Twisted",
|
||||
"Intended Audience :: Developers",
|
||||
"Intended Audience :: Education",
|
||||
"Operating System :: MacOS",
|
||||
"Operating System :: Microsoft :: Windows",
|
||||
"Operating System :: POSIX :: Linux",
|
||||
"Topic :: Database",
|
||||
"Topic :: Education",
|
||||
"Topic :: Games/Entertainment :: Multi-User Dungeons (MUD)",
|
||||
"Topic :: Games/Entertainment :: Puzzle Games",
|
||||
"Topic :: Games/Entertainment :: Role-Playing",
|
||||
"Topic :: Games/Entertainment :: Simulation",
|
||||
"Topic :: Software Development :: Libraries :: Application Frameworks",
|
||||
"Topic :: Internet :: WWW/HTTP :: WSGI :: Server",
|
||||
],
|
||||
python_requires=">=3.7",
|
||||
project_urls={
|
||||
"Source": "https://github.com/evennia/evennia",
|
||||
"Issue tracker": "https://github.com/evennia/evennia/issues",
|
||||
"Chat": "http://www.evennia.com/chat-redirect-3",
|
||||
"Forum": "https://groups.google.com/forum/#%21forum/evennia",
|
||||
"Dev Blog": "https://evennia.blogspot.com/",
|
||||
"Patreon": "https://www.patreon.com/griatch",
|
||||
},
|
||||
)
|
||||
# legacy entrypoint
|
||||
setup(scripts=get_evennia_executable(), package_data={"": get_all_files()})
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user