Skip to content

Commit

Permalink
Added build stuff (#5)
Browse files Browse the repository at this point in the history
* Added build stuff
* Makefile
* .travis.yml
* Fix for python 3.7 generic list test
  • Loading branch information
bobthemighty authored Feb 5, 2019
1 parent c99ed2a commit 074476e
Show file tree
Hide file tree
Showing 14 changed files with 677 additions and 121 deletions.
2 changes: 1 addition & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,7 @@ instance/
.scrapy

# Sphinx documentation
docs/_build/
docs/build/

# PyBuilder
target/
Expand Down
18 changes: 18 additions & 0 deletions .travis.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
dist: xenial
language: python
python:
- 3.6
- 3.7
script:
- make travis
after_success:
- codecov
deploy:
provider: pypi
password:
secure: XOyq2ZlY9OIwUEI4aJK/lG1CRDcd12XahLCAda5uUEODEB+hYpyr9zLGDHCLSIu/jU0jhbKbRyhIM5056TM8d29XLpq7pXTDMDwUxEc9rY37cC+OvO8MoocMAkzfvdQ8vaNMe3xrW49vGApMNm8Er+aZvMhqThfjjA/mIaDxjyajt+d0pN7Ow8IaGur8vPzvhaNZuS/bYiwhAHXEEUBIk6xLB1nPkk1FnVIXETjM1c28Sas9ki95gvgWWkMwtGXmn/T6waf0zOtdAC66lJZL5nwj1MTjw1uhZYB+/QhIlPzPSyvDD9sIqJnEEOlT5eUKGV2yp+Eo3qjN7fPIKmhB5ydtIvz/96why0Gobc6BIrOROYT1kn/NTi3R5FCZDQ4+xQPd6po+Pu8COqSRhSJWltAWgnNR1JmUnPVj0rEQaJzi/gqmGQ1Y4TQ0/KsjbYuU7p+mzpcGKh+y1fiPFYRTvrRlBeZbx38vJ8g0rpNtSGi2DkDNl2vCEl4ZMhKnO2AY9TSX9ziIpmPxCN6wo6aIhkmOPIu6QEWv6MVl5pHDIRnm6MhEZ6RL50FeN4jRCrE6ORi0xuAb02tBUAl25teKwiuQ771jcvdsE48+gySBVffHfuO+tdC0+9JPf96uwVemCh5eHxj7wyEFAR1e00NnqY8tGaGroeQ3VkeZxSu/irc=
user: bobthemighty
true:
tags: true
distributions: sdist
repo: bobthemighty/punq
16 changes: 16 additions & 0 deletions Makefile
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
BLACK_EXCLUSION=docs/source/conf.py
default: init test
travis: init check_lint test

init:
pip install pipenv
pipenv install --dev

test: lint
pipenv run run-contexts -sv

lint:
pipenv run black . --exclude "${BLACK_EXCLUSION}"

check_lint:
pipenv run black --check . --exclude "${BLACK_EXCLUSION}"
22 changes: 22 additions & 0 deletions Pipfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
[[source]]
name = "pypi"
url = "https://pypi.org/simple"
verify_ssl = true

[dev-packages]
colorama = "==0.3.9"
expects = "==0.8.0"
Contexts = "==0.11.2"
black = "*"
sphinx = "*"
setuptools-scm = "*"

[packages]
setuptools-scm = "*"
punq = {editable = true,path = "."}

[requires]
python_version = "3.7"

[pipenv]
allow_prereleases = true
262 changes: 262 additions & 0 deletions Pipfile.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

6 changes: 3 additions & 3 deletions docs/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,8 @@
SPHINXOPTS =
SPHINXBUILD = sphinx-build
SPHINXPROJ = photon-pump
SOURCEDIR = .
BUILDDIR = _build
SOURCEDIR = source
BUILDDIR = build

# Put it first so that "make" without argument is like "make help".
help:
Expand All @@ -17,4 +17,4 @@ help:
# Catch-all target: route all unknown targets to Sphinx using the new
# "make mode" option. $(O) is meant as a shortcut for $(SPHINXOPTS).
%: Makefile
@$(SPHINXBUILD) -M $@ "$(SOURCEDIR)" "$(BUILDDIR)" $(SPHINXOPTS) $(O)
@$(SPHINXBUILD) -M $@ "$(SOURCEDIR)" "$(BUILDDIR)" $(SPHINXOPTS) $(O)
35 changes: 35 additions & 0 deletions docs/make.bat
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
@ECHO OFF

pushd %~dp0

REM Command file for Sphinx documentation

if "%SPHINXBUILD%" == "" (
set SPHINXBUILD=sphinx-build
)
set SOURCEDIR=source
set BUILDDIR=build

if "%1" == "" goto help

%SPHINXBUILD% >NUL 2>NUL
if errorlevel 9009 (
echo.
echo.The 'sphinx-build' command was not found. Make sure you have Sphinx
echo.installed, then set the SPHINXBUILD environment variable to point
echo.to the full path of the 'sphinx-build' executable. Alternatively you
echo.may add the Sphinx directory to PATH.
echo.
echo.If you don't have Sphinx installed, grab it from
echo.http://sphinx-doc.org/
exit /b 1
)

%SPHINXBUILD% -M %1 %SOURCEDIR% %BUILDDIR% %SPHINXOPTS%
goto end

:help
%SPHINXBUILD% -M help %SOURCEDIR% %BUILDDIR% %SPHINXOPTS%

:end
popd
Loading

0 comments on commit 074476e

Please sign in to comment.