-
-
Notifications
You must be signed in to change notification settings - Fork 5
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
0 parents
commit ef6bd62
Showing
23 changed files
with
332 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,71 @@ | ||
# Byte-compiled / optimized / DLL files | ||
__pycache__/ | ||
*.py[cod] | ||
*$py.class | ||
|
||
# C extensions | ||
*.so | ||
|
||
# Distribution / packaging | ||
.Python | ||
env/ | ||
build/ | ||
develop-eggs/ | ||
dist/ | ||
downloads/ | ||
eggs/ | ||
.eggs/ | ||
lib64/ | ||
parts/ | ||
sdist/ | ||
var/ | ||
*.egg-info/ | ||
.installed.cfg | ||
*.egg | ||
|
||
# PyInstaller | ||
# Usually these files are written by a python script from a template | ||
# before PyInstaller builds the exe, so as to inject date/other infos into it. | ||
*.manifest | ||
*.spec | ||
|
||
# Installer logs | ||
pip-log.txt | ||
pip-delete-this-directory.txt | ||
|
||
# Unit test / coverage reports | ||
htmlcov/ | ||
.tox/ | ||
.coverage | ||
.coverage.* | ||
.cache | ||
nosetests.xml | ||
coverage.xml | ||
*,cover | ||
.hypothesis/ | ||
|
||
# Translations | ||
*.mo | ||
*.pot | ||
|
||
# Django stuff: | ||
*.log | ||
|
||
# Sphinx documentation | ||
docs/_build/ | ||
|
||
# PyBuilder | ||
target/ | ||
|
||
#Ipython Notebook | ||
.ipynb_checkpoints | ||
|
||
# PyCharm files | ||
.idea/ | ||
|
||
# Project files | ||
tests/runner.py | ||
tests/profiler.py | ||
|
||
# OS X | ||
.DS_Store |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,22 @@ | ||
# Config file for automatic testing at travis-ci.org | ||
|
||
sudo: false | ||
language: python | ||
matrix: | ||
include: | ||
- python: 2.7 | ||
env: TOX_ENV=py27 | ||
- python: 2.7 | ||
env: TOX_ENV=py34 | ||
- python: 3.5 | ||
env: TOX_ENV=py35 | ||
- python: 3.6 | ||
env: TOX_ENV=py36 | ||
|
||
script: tox -e $TOX_ENV | ||
|
||
install: | ||
- pip install tox | ||
|
||
notifications: | ||
email: false |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
## Changelog | ||
|
||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
include docs/LICENSE | ||
include docs/README.rst |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
## font-v |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,24 @@ | ||
build: false | ||
environment: | ||
matrix: | ||
- TOXENV: py27 | ||
- TOXENV: py34 | ||
- TOXENV: py35 | ||
- TOXENV: py36 | ||
platform: | ||
- x86 | ||
- x64 | ||
init: | ||
- "ECHO %TOXENV%" | ||
- ps: "ls C:\\Python*" | ||
install: | ||
- ps: Invoke-WebRequest "https://bootstrap.pypa.io/ez_setup.py" -OutFile "c:\\ez_setup.py" | ||
- ps: Invoke-WebRequest "https://bootstrap.pypa.io/get-pip.py" -OutFile "c:\\get-pip.py" | ||
- "c:\\python27\\python c:\\ez_setup.py" | ||
- "c:\\python27\\python c:\\get-pip.py" | ||
- "c:\\python27\\Scripts\\pip install tox" | ||
test_script: | ||
- "git clean -f -d -x" | ||
- "c:\\python27\\Scripts\\tox --version" | ||
- "c:\\python27\\Scripts\\pip --version" | ||
- "c:\\python27\\Scripts\\tox" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
codecov: | ||
max_report_age: off |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
#!/bin/sh | ||
|
||
coverage run --source font-v -m py.test | ||
coverage report -m | ||
coverage html | ||
|
||
#coverage xml | ||
#codecov --token=$CODECOV_{{font-v}} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,20 @@ | ||
The MIT License (MIT) | ||
|
||
Copyright (c) 2017 Christopher Simpkins | ||
|
||
Permission is hereby granted, free of charge, to any person obtaining a copy of | ||
this software and associated documentation files (the "Software"), to deal in | ||
the Software without restriction, including without limitation the rights to | ||
use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of | ||
the Software, and to permit persons to whom the Software is furnished to do so, | ||
subject to the following conditions: | ||
|
||
The above copyright notice and this permission notice shall be included in all | ||
copies or substantial portions of the Software. | ||
|
||
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR | ||
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS | ||
FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR | ||
COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER | ||
IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN | ||
CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
font-v | ||
======== | ||
|
||
A font version string tool. | ||
|
||
Source and documentation: https://github.com/source-foundry/font-v | ||
Issue reporting: https://github.com/source-foundry/font-v/issues | ||
License: MIT |
Empty file.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
#!/usr/bin/env python | ||
# -*- coding: utf-8 -*- | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,30 @@ | ||
#!/usr/bin/env python | ||
# -*- coding: utf-8 -*- | ||
|
||
import os | ||
import sys | ||
|
||
from commandlines import Command | ||
|
||
from fontv import settings | ||
|
||
|
||
def main(): | ||
c = Command() | ||
|
||
if c.does_not_validate_missing_args(): | ||
sys.stderr.write("[font-v] ERROR: Please include the appropriate arguments with your command." + os.linesep) | ||
sys.exit(1) | ||
|
||
if c.is_help_request(): | ||
print(settings.HELP) | ||
sys.exit(0) | ||
elif c.is_version_request(): | ||
print(settings.VERSION) | ||
sys.exit(0) | ||
elif c.is_usage_request(): | ||
print(settings.USAGE) | ||
sys.exit(0) | ||
|
||
if __name__ == '__main__': | ||
main() |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
#!/usr/bin/env python | ||
# -*- coding: utf-8 -*- |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,37 @@ | ||
#!/usr/bin/env python | ||
# -*- coding: utf-8 -*- | ||
|
||
# ------------------------------------------------------------------------------ | ||
# Library Name | ||
# ------------------------------------------------------------------------------ | ||
lib_name = 'font-v' | ||
|
||
# ------------------------------------------------------------------------------ | ||
# Version Number | ||
# ------------------------------------------------------------------------------ | ||
major_version = "0" | ||
minor_version = "0" | ||
patch_version = "1" | ||
|
||
# ------------------------------------------------------------------------------ | ||
# Help String | ||
# ------------------------------------------------------------------------------ | ||
|
||
HELP = """ | ||
*** | ||
""" | ||
|
||
# ------------------------------------------------------------------------------ | ||
# Version String | ||
# ------------------------------------------------------------------------------ | ||
|
||
VERSION = "font-v v" + major_version + "." + minor_version + "." + patch_version | ||
|
||
|
||
# ------------------------------------------------------------------------------ | ||
# Usage String | ||
# ------------------------------------------------------------------------------ | ||
|
||
USAGE = """ | ||
*** | ||
""" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
#!/bin/sh | ||
|
||
python3 setup.py sdist bdist_wheel | ||
twine upload dist/font-v-0.1.0* |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
commandlines | ||
gitpython |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
[wheel] | ||
universal = 1 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,63 @@ | ||
import os | ||
import re | ||
from setuptools import setup, find_packages | ||
|
||
|
||
def docs_read(fname): | ||
return open(os.path.join(os.path.dirname(__file__), 'docs', fname)).read() | ||
|
||
|
||
def version_read(): | ||
settings_file = open(os.path.join(os.path.dirname(__file__), 'lib', 'fontv', 'settings.py')).read() | ||
major_regex = """major_version\s*?=\s*?["']{1}(\d+)["']{1}""" | ||
minor_regex = """minor_version\s*?=\s*?["']{1}(\d+)["']{1}""" | ||
patch_regex = """patch_version\s*?=\s*?["']{1}(\d+)["']{1}""" | ||
major_match = re.search(major_regex, settings_file) | ||
minor_match = re.search(minor_regex, settings_file) | ||
patch_match = re.search(patch_regex, settings_file) | ||
major_version = major_match.group(1) | ||
minor_version = minor_match.group(1) | ||
patch_version = patch_match.group(1) | ||
if len(major_version) == 0: | ||
major_version = 0 | ||
if len(minor_version) == 0: | ||
minor_version = 0 | ||
if len(patch_version) == 0: | ||
patch_version = 0 | ||
return major_version + "." + minor_version + "." + patch_version | ||
|
||
|
||
setup( | ||
name='font-v', | ||
version=version_read(), | ||
description='Font version string tool', | ||
long_description=(docs_read('README.rst')), | ||
url='https://github.com/source-foundry/font-v', | ||
license='MIT license', | ||
author='Christopher Simpkins', | ||
author_email='chris@sourcefoundry.org', | ||
platforms=['any'], | ||
packages=find_packages("lib"), | ||
package_dir={'': 'lib'}, | ||
install_requires=['commandlines', 'gitpython'], | ||
entry_points={ | ||
'console_scripts': [ | ||
'font-v = fontv.app:main' | ||
], | ||
}, | ||
keywords='', | ||
include_package_data=True, | ||
classifiers=[ | ||
'Development Status :: 4 - Beta', | ||
'Natural Language :: English', | ||
'License :: OSI Approved :: MIT License', | ||
'Operating System :: OS Independent', | ||
'Programming Language :: Python', | ||
'Programming Language :: Python :: 2', | ||
'Programming Language :: Python :: 2.7', | ||
'Programming Language :: Python :: 3', | ||
'Programming Language :: Python :: 3.4', | ||
'Programming Language :: Python :: 3.5', | ||
'Programming Language :: Python :: 3.6' | ||
], | ||
) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
#!/bin/sh | ||
|
||
# test_runner.sh : local testing script | ||
|
||
tox -e py27,py36 |
Empty file.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
#!/usr/bin/env python | ||
# -*- coding: utf-8 -*- | ||
|
||
import sys | ||
import pytest |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
[tox] | ||
envlist = py27, py34, py35, py36 | ||
|
||
[testenv] | ||
passenv = TOXENV CI TRAVIS TRAVIS_* | ||
commands = | ||
py.test tests | ||
|
||
deps = | ||
pytest | ||
pytest-mock | ||
mock | ||
coverage | ||
codecov>=1.4.0 | ||
|
||
|
||
;[testenv:cov-report] | ||
;commands = py.test --cov=ufolint --cov-report=term --cov-report=html |