Skip to content

Commit

Permalink
Merge pull request #38 from opalmer/release_tools
Browse files Browse the repository at this point in the history
Release Tools and Dev Module
  • Loading branch information
opalmer committed Jan 17, 2016
2 parents fe8a3bb + 7bf18c2 commit 6673930
Show file tree
Hide file tree
Showing 14 changed files with 1,136 additions and 25 deletions.
2 changes: 1 addition & 1 deletion .ci/travis/script.sh
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ if [[ $PYLINT == "1" ]]; then
# purposes.
pylint tests \
--disable missing-docstring,invalid-name \
--disable protected-access,no-self-use
--disable protected-access,no-self-use,unused-argument
fi

if [[ $READTHEDOCS == "1" ]]; then
Expand Down
2 changes: 1 addition & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -12,5 +12,5 @@
/.provision
/.ci/vagrant/sshd/files/authorized_keys
/pywincffi.ini
*Release*
/Release*
*_pywincffi.c
2 changes: 2 additions & 0 deletions dev_requirements.txt
Original file line number Diff line number Diff line change
Expand Up @@ -8,4 +8,6 @@ sphinx
wheel
setuptools
coverage
requests
codecov
PyGithub
18 changes: 5 additions & 13 deletions docs/source/conf.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@

from __future__ import print_function

import ast
import os
import shutil
import sys
Expand Down Expand Up @@ -32,6 +31,8 @@
# Required so we don't need to have pywincffi installed.
sys.path.insert(0, ROOT)

from pywincffi import __version__


# -- General configuration ------------------------------------------------

Expand Down Expand Up @@ -71,21 +72,12 @@
copyright = "2015, Oliver Palmer"
author = "Oliver Palmer"

with open(join(ROOT, "setup.py")) as setup_py:
module = ast.parse(setup_py.read())

for node in ast.walk(module):
if isinstance(node, ast.keyword) and node.arg == "version":
parsed_version = node.value.s.split(".")
break
else:
raise ValueError("Failed to find `version` keyword")

# 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.
release = ".".join(parsed_version)
version = ".".join(parsed_version[0:2])
version = list(map(str, __version__))
release = ".".join(version)
version = ".".join(version[0:2])

# Delete the existing doc files first so it
# sphinx-apidoc is clean every time.
Expand Down
9 changes: 9 additions & 0 deletions pywincffi/__init__.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
"""
PyWinCFFI
=========
A core Python package that uses :mod:`cffi` to interact
with Windows APIs. See :ref:`modindex` for more detailed
information.
"""
__version__ = (0, 1, 0)
9 changes: 4 additions & 5 deletions pywincffi/core/__init__.py
Original file line number Diff line number Diff line change
@@ -1,8 +1,7 @@
"""
Core
====
Core Sub-Package
================
The core package used internally by pywincffi. This package contains
wrappers for :class:`cffi.api.FFI`, a logger and some basic code used
by the unittests.
The core package is used internally by pywincffi. See the documentation
for each module for more information.
"""
4 changes: 4 additions & 0 deletions pywincffi/core/pywincffi.ini
Original file line number Diff line number Diff line change
Expand Up @@ -7,3 +7,7 @@
; error
; critical
log_level=warning

; Used by release tools to interact with GitHub's
; APIs.
github_token=
5 changes: 3 additions & 2 deletions pywincffi/dev/__init__.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
"""
Dev
====
Development Sub-Package
=======================
This package is used for development, testing and release purposes. It
does not contain core functionality of pywincffi.
"""
Loading

0 comments on commit 6673930

Please sign in to comment.