diff --git a/.travis.yml b/.travis.yml index 2d5e2a1..f865e00 100644 --- a/.travis.yml +++ b/.travis.yml @@ -2,22 +2,30 @@ sudo: false dist: xenial language: python python: - - "2.7" - - "3.4" - - "3.5" - "3.6" - "3.7" + - "3.8" addons: apt: packages: + - curl - make +cache: + pip: true + directories: + - "$HOME/.cache/pypoetry" + install: - - make ci-install + - pip install --upgrade pip + - curl -sSL https://raw.githubusercontent.com/sdispater/poetry/master/get-poetry.py > get-poetry.py + - python get-poetry.py -y + - source $HOME/.poetry/env + - poetry install script: - - make ci-test + - poetry run pytest --cov=./xoinvader --cov-report=xml -s -v xoinvader/tests after_success: - codecov diff --git a/MANIFEST.in b/MANIFEST.in deleted file mode 100644 index 1f49858..0000000 --- a/MANIFEST.in +++ /dev/null @@ -1,3 +0,0 @@ -include README.rst -include LICENSE -recursive-include xoinvader res/gfx/* res/snd/* config/* diff --git a/Makefile b/Makefile index b31421a..1e47baa 100644 --- a/Makefile +++ b/Makefile @@ -1,9 +1,4 @@ DOCPATH = ./docs -PYVERSION ?= 3 -VENV ?= .venv -VENV_CMD = virtualenv --python=python$(PYVERSION) -PYTHON ?= $(VENV)/bin/python$(PYVERSION) -PYTEST = $(VENV)/bin/py.test COV_FMT ?= html PIP ?= $(VENV)/bin/pip RM = rm -f @@ -12,45 +7,33 @@ all: help clean: $(RM) -r *~ ./xoinvader/*~ ./xoinvader/tests/*~ ./xoinvader/*.pyc ./xoinvader/tests/*.pyc ./dist ./build - $(RM) -r $(VENV) *.egg-info + $(RM) -r *.egg-info $(RM) -r ./htmlcov ./docs/build/ install: $(PIP) install . devel: - $(VENV_CMD) $(VENV) - $(PIP) install -r requirements.txt - $(PIP) install -r dev-requirements.txt - $(PIP) install -e . - -# CI isolates virtualenvs itself, we don't have to think about it -ci-install: - pip install -r requirements.txt - pip install -r dev-requirements.txt - pip install . - -ci-test: - py.test --cov=./xoinvader --cov-report=xml --strict -v + poetry install help: @printf "USAGE: make [params]\n" lint: @printf "Warnings are disabled. To full check use 'make lint-full'\n" - @$(PYTEST) --pylint -m pylint -vvvv $(PYTEST_ARGS) --pylint-error-types CREF + poetry run pytest --pylint -m pylint -vvvv $(PYTEST_ARGS) --pylint-error-types CREF lint-full: - @$(PYTEST) --pylint -m pylint -vvvv $(PYTEST_ARGS) --pylint-error-types CREWF + poetry run pytest --pylint -m pylint -vvvv $(PYTEST_ARGS) --pylint-error-types CREWF test: - @$(PYTEST) --cov=./xoinvader --cov-report=$(COV_FMT) --strict -v $(PYTEST_ARGS) + poetry run pytest --cov=./xoinvader --cov-report=$(COV_FMT) --strict -v $(PYTEST_ARGS) view_cov: test @xdg-open ./htmlcov/index.html docs: - $(MAKE) -C $(DOCPATH) -f Makefile html SPHINXBUILD="$(CURDIR)/$(VENV)/bin/sphinx-build" + poetry run $(MAKE) -C $(DOCPATH) -f Makefile html SPHINXBUILD=sphinx-build view_docs: docs @xdg-open $(DOCPATH)/build/html/index.html diff --git a/dev-requirements.txt b/dev-requirements.txt deleted file mode 100644 index ba4622d..0000000 --- a/dev-requirements.txt +++ /dev/null @@ -1,9 +0,0 @@ -codecov -coverage -flake8 -pytest -pylint -pytest-coverage -pytest-pylint -sphinx -tox diff --git a/pyproject.toml b/pyproject.toml index 7ee018a..4ec37fa 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -1,6 +1,6 @@ [tool.poetry] name = "xoinvader" -version = "0.1.2" +version = "0.1.3" description = "(not so) small python curses space game" authors = ["Pavel Kulyov "] license = "MIT" @@ -15,8 +15,8 @@ keywords = ["curses", "space", "game"] classifiers = [ "Development Status :: 3 - Alpha", "Environment :: Console :: Curses", - "Environment :: X11 Applications", - "Intended Audience :: Developers", + "Environment :: X11 Applications", + "Intended Audience :: Developers", "Intended Audience :: Education", "Intended Audience :: End Users/Desktop", "License :: OSI Approved :: MIT License", @@ -33,7 +33,7 @@ classifiers = [ xoigame = "xoinvader.game:main" [tool.poetry.dependencies] -python = "~2.7 || ^3.4" +python = "^3.6" tornado = "^4" pygame = "*" six = "*" diff --git a/requirements.txt b/requirements.txt deleted file mode 100644 index b6e0e0b..0000000 --- a/requirements.txt +++ /dev/null @@ -1,3 +0,0 @@ -six -tornado>=4,<5 -pygame>=1.9,<2 diff --git a/setup.py b/setup.py deleted file mode 100644 index 072568f..0000000 --- a/setup.py +++ /dev/null @@ -1,54 +0,0 @@ -"""Setup manifest for XOInvader.""" - -import os - -from setuptools import setup, find_packages - - -BASEDIR = os.path.abspath(os.path.dirname(__file__)) - - -def read(filename): - """Read description.""" - with open(os.path.join(BASEDIR, filename)) as fd: - return fd.read() - - -# TODO: Think about pygame installing. - -setup( - name="XOInvader", - description="Curses/Pygame space game", - version="0.1.2", - author="Pavel Kulyov", - author_email="kulyov.pavel@gmail.com", - long_description=read("README.rst"), - url="http://www.g-v.im/", - packages=find_packages(), - license="MIT", - include_package_data=True, - platforms="Posix", - install_requires=[], - - entry_points=""" - [console_scripts] - xoigame = xoinvader.game:main - """, - - classifiers=[ - "Development Status :: 3 - Alpha", - "Environment :: Console :: Curses", - "Environment :: X11 Applications", - "Intended Audience :: Developers", - "Intended Audience :: Education", - "Intended Audience :: End Users/Desktop", - "License :: OSI Approved :: MIT License", - "Natural Language :: English", - "Operating System :: POSIX :: Linux", - "Programming Language :: Python :: 2.7", - "Programming Language :: Python :: 3", - "Programming Language :: Python :: Implementation :: CPython", - "Topic :: Games/Entertainment :: Arcade", - "Topic :: Software Development :: Libraries :: pygame", - ] -) diff --git a/xoinvader/__init__.py b/xoinvader/__init__.py index fc62881..8a223b6 100644 --- a/xoinvader/__init__.py +++ b/xoinvader/__init__.py @@ -15,7 +15,7 @@ from .utils import setup_logger -__version__ = "0.1.2" +__version__ = "0.1.3" class XOInitializationError(Exception):