Skip to content

Commit

Permalink
Merge branch 'master' into networkdict-speedup
Browse files Browse the repository at this point in the history
  • Loading branch information
godwhoa committed Nov 6, 2018
2 parents 461209f + a23cf19 commit 36675fb
Show file tree
Hide file tree
Showing 105 changed files with 2,498 additions and 1,621 deletions.
124 changes: 0 additions & 124 deletions .dockerignore

This file was deleted.

1 change: 1 addition & 0 deletions .dockerignore
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -41,6 +41,7 @@ piqueserver/config/maps/*.txtc
piqueserver/config/maps/*.saved.vxl
piqueserver/config/logs/*
piqueserver/config/data/*
piqueserver/config/bans.txt

# py2exe
py2exe/dist/
Expand Down
7 changes: 3 additions & 4 deletions .travis.yml
Original file line number Diff line number Diff line change
@@ -1,21 +1,20 @@
language: python
dist: trusty
dist: xenial
sudo: required
cache: pip

python:
- 3.4
- 3.5
- 3.6
- 3.7

install:
- pip install -r requirements.txt
- pip install -r dev-requirements.txt

script:
- export CYTHON_TRACE=1
- python setup.py install
- python setup.py build_ext --inplace
- python setup.py develop
- pytest --cov=piqueserver --cov=pyspades
- travis_retry coveralls
# - pylint piqueserver
Expand Down
6 changes: 5 additions & 1 deletion Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,11 @@ COPY setup.py COPYING.txt CREDITS.txt LICENSE README.rst /usr/src/app/

RUN apk add --no-cache --virtual .build-deps-server gcc musl-dev g++ \
&& STDCPP_STATIC=1 python ./setup.py install \
&& apk del .build-deps-server
&& apk del .build-deps-server \
&& cd / && rm -rf /usr/src/app

# We need ssl support for fetching server's IP
RUN apk add --no-cache openssl

# Copy over the rest and default to launching the server
CMD piqueserver -d /config
Expand Down
27 changes: 5 additions & 22 deletions MANIFEST.in
Original file line number Diff line number Diff line change
@@ -1,9 +1,6 @@
recursive-include enet/ *
recursive-include examples/ *
recursive-include piqueserver/ *
# recursive-include piqueserver/config/ *
recursive-include py2exe/ *
recursive-include pyspades/ *
recursive-include piqueserver *
recursive-include piqueserver/config *
recursive-include pyspades *
# recursive-include piqueserver.egg-info/ *

global-exclude *.pyc
Expand All @@ -28,12 +25,8 @@ global-exclude *.a

# config/userdata
exclude piqueserver/config/maps/*.txtc
recursive-exclude piqueserver/config/logs/ *
recursive-exclude piqueserver/config/data/ *

# py2exe
recursive-exclude py2exe/dist/
exclude py2exe/*.zip
recursive-exclude piqueserver/config/logs *
recursive-exclude piqueserver/config/data *

exclude pyspades/bytes.cpp
exclude pyspades/common.cpp
Expand All @@ -43,13 +36,3 @@ exclude pyspades/mapmaker.cpp
exclude pyspades/packet.cpp
exclude pyspades/vxl.cpp
exclude pyspades/world.cpp


# enet
exclude enet/pyenet/enet.c
# exclude enet/pyenet/__init__.py
exclude enet/pyenet/enet-pyspades.pyx
recursive-exclude enet/pyenet/enet/ *
recursive-exclude enet/pyenet/build/ *
exclude enet/enet-*.tar.gz

16 changes: 15 additions & 1 deletion Makefile
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@

.PHONY: all help fixme install pylint
.PHONY: all help fixme install pylint clean develop wheels

all: help

Expand All @@ -11,9 +11,23 @@ help:
@echo "make install: run setup.py install"
@echo "make pylint: run pylint"
@echo "make fixme: find FIXME, TODO, NOTE, and XXX in the code"
@echo "make clean: remove all build artifacts after building inplace"
@echo "make develop: run setup.py develop to build inplace for development"
@echo "make wheels: run the docker script to build the wheels"

pylint:
pylint piqueserver

fixme:
pylint piqueserver pyspades --disable=all --enable=fixme

clean:
rm -f pyspades/*.so # built c extensions
rm -f pyspades/{bytes,common,contained,loaders,mapmaker,packet,vxl,world}.cpp # generated by cython
rm -rf build/ piqueserver.egg-info/

develop:
python setup.py develop

wheels:
./scripts/build_wheels.sh
6 changes: 3 additions & 3 deletions README.rst
Original file line number Diff line number Diff line change
Expand Up @@ -47,10 +47,10 @@ All of these are `bridged <https://matrix.org/docs/guides/faq.html#what-is-matri
Requirements
~~~~~~~~~~~~

Piqueserver requires python3.4+ (3.5+ on Windows).
Piqueserver requires python3.5+

We currently provide builds for:
- Linux 32 and 64bit, Python 3.4, 3.5, 3.6
- Linux 32 and 64bit, Python 3.5, 3.6
- Windows 32 and 64bit, Python 3.5, 3.6

If your system is not one of the above, you will also need a recent C++ Compiler.
Expand Down Expand Up @@ -170,7 +170,7 @@ Use ``python3`` and ``pip`` to setup the development environment:
$ python3 -m venv venv && source venv/bin/activate
(venv) $ pip install -r requirements.txt
(venv) $ pip install -r dev-requirements.txt # includes dev tools
(venv) $ python setup.py install
(venv) $ python setup.py develop # install in-place
(venv) $ deactivate # Deactivate virtualenv
--------------
Expand Down
48 changes: 48 additions & 0 deletions appveyor.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,48 @@
version: 1.0.{build}
pull_requests:
do_not_increment_build_number: true
image: Visual Studio 2017
shallow_clone: true

environment:
PATH: '%PYTHON%;%PYTHON%\Scripts;%PATH%'
matrix:
- PYTHON: C:\Python36-x64
DO_EXE: whynot
- PYTHON: C:\Python35-x64
- PYTHON: C:\Python37-x64
- PYTHON: C:\Python36
- PYTHON: C:\Python35
- PYTHON: C:\Python37

install:
- cmd: >-
python -m pip install -U pip wheel setuptools
pip --version
if defined DO_EXE (pip install -U pyinstaller)
pip install -r requirements.txt
pip install -r dev-requirements.txt
build_script:
- cmd: >-
python --version
python setup.py build_ext --inplace -c msvc
python setup.py build -c msvc
python setup.py sdist
python setup.py bdist_wheel
test_script:
- cmd: pytest

artifacts:
- path: dist/*

deploy: off
14 changes: 14 additions & 0 deletions dev.Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
ARG PYTHON_VERSION=3.6
ARG APPDIR=/app

# Build
FROM python:$PYTHON_VERSION

# Set venv
ARG APPDIR
ENV APPDIR ${APPDIR}
RUN python -m venv ${APPDIR}
ENV PATH "${APPDIR}/bin:${PATH}"

CMD pip --no-cache-dir install -e ${APPDIR}/src && \
piqueserver -d /config
18 changes: 14 additions & 4 deletions doc/conf.py
Original file line number Diff line number Diff line change
Expand Up @@ -61,17 +61,27 @@

# General information about the project.
project = 'piqueserver'
copyright = '2017, piqueserver dev team'
copyright = '2018, piqueserver dev team'
author = 'piqueserver dev team'

# The version info for the project you're documenting, acts as replacement for
# |version| and |release|, also used in various other places throughout the
# built documents.
#
# The short X.Y version.
version = '0.1.3'

# read version info from the piqueserver project
here = os.path.abspath(os.path.dirname(__file__))
_version = {}
with open(os.path.join(here, '../piqueserver/version.py')) as f:
exec(f.read(), _version)

# The short X.Y.Z version.
version = '{}.{}.{}'.format(*_version['__version_info__'])
# The full version, including alpha/beta/rc tags.
release = '0.1.3'
release = _version['__version__']

# show authors on the script pages
show_authors = True

# The language for content autogenerated by Sphinx. Refer to documentation
# for a list of supported languages.
Expand Down
Loading

0 comments on commit 36675fb

Please sign in to comment.