remove ufoLib repo configuration files that overlap with fonttools
This commit is contained in:
parent
6096fa7d4d
commit
f03c2faf12
@ -1,5 +0,0 @@
|
||||
comment: false
|
||||
coverage:
|
||||
status:
|
||||
project: off
|
||||
patch: off
|
35
.coveragerc
35
.coveragerc
@ -1,35 +0,0 @@
|
||||
[run]
|
||||
# measure 'branch' coverage in addition to 'statement' coverage
|
||||
# See: http://coverage.readthedocs.io/en/coverage-4.5.1/branch.html
|
||||
branch = True
|
||||
|
||||
# list of directories or packages to measure
|
||||
source = ufoLib
|
||||
|
||||
# these are treated as equivalent when combining data
|
||||
[paths]
|
||||
source =
|
||||
Lib/ufoLib
|
||||
.tox/*/lib/python*/site-packages/ufoLib
|
||||
.tox/*/Lib/site-packages/ufoLib
|
||||
.tox/pypy*/site-packages/ufoLib
|
||||
|
||||
[report]
|
||||
# Regexes for lines to exclude from consideration
|
||||
exclude_lines =
|
||||
# keywords to use in inline comments to skip coverage
|
||||
pragma: no cover
|
||||
|
||||
# don't complain if tests don't hit defensive assertion code
|
||||
raise AssertionError
|
||||
raise NotImplementedError
|
||||
|
||||
# don't complain if non-runnable code isn't run
|
||||
if 0:
|
||||
if __name__ == .__main__.:
|
||||
|
||||
# Don't include files that are 100% covered
|
||||
skip_covered = True
|
||||
|
||||
# ignore source code that can’t be found
|
||||
ignore_errors = True
|
13
.gitignore
vendored
13
.gitignore
vendored
@ -1,13 +0,0 @@
|
||||
.cache
|
||||
__pycache__/
|
||||
build/
|
||||
dist/
|
||||
.coverage
|
||||
.coverage.*
|
||||
.DS_Store
|
||||
*.egg-info
|
||||
*.py[cod]
|
||||
.eggs/
|
||||
.tox/
|
||||
/.pytest_cache
|
||||
htmlcov/
|
@ -1,5 +0,0 @@
|
||||
# controls the frequency of updates (undocumented beta feature)
|
||||
schedule: every week
|
||||
|
||||
# do not pin dependencies unless they have explicit version specifiers
|
||||
pin: False
|
20
LICENSE.txt
20
LICENSE.txt
@ -1,20 +0,0 @@
|
||||
ufoLib License Agreement
|
||||
|
||||
Copyright (c) 2005-2018, The RoboFab Developers:
|
||||
Erik van Blokland
|
||||
Tal Leming
|
||||
Just van Rossum
|
||||
|
||||
All rights reserved.
|
||||
|
||||
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.
|
||||
|
||||
Up to date info on ufoLib:
|
||||
https://github.com/unified-font-object/ufoLib
|
||||
|
||||
This is the MIT License:
|
||||
https://opensource.org/licenses/MIT
|
@ -1,9 +0,0 @@
|
||||
include README.md notes.txt LICENSE.txt
|
||||
|
||||
include Documentation/Makefile
|
||||
recursive-include Documentation *.py *.rst
|
||||
|
||||
recursive-include tests *.py
|
||||
recursive-include tests/testdata *.plist *.glif *.fea *.txt *.ttx *ufoz
|
||||
|
||||
include requirements.txt extra_requirements.txt .coveragerc tox.ini
|
26
README.md
26
README.md
@ -1,26 +0,0 @@
|
||||
[](https://travis-ci.org/unified-font-object/ufoLib)
|
||||
[](https://ci.appveyor.com/project/adrientetar/ufolib)
|
||||

|
||||
[](https://pypi.org/project/ufoLib/)
|
||||
[](https://codecov.io/gh/unified-font-object/ufoLib)
|
||||
|
||||
ufoLib
|
||||
------
|
||||
|
||||
A low-level [UFO] reader and writer.
|
||||
|
||||
[UFO] is a human-readable, XML-based file format that stores font source files.
|
||||
|
||||
### Installation
|
||||
|
||||
```sh
|
||||
$ pip install ufoLib
|
||||
```
|
||||
|
||||
For better speed, you can install with extra dependencies like this:
|
||||
|
||||
```sh
|
||||
$ pip install ufoLib[lxml]
|
||||
```
|
||||
|
||||
[UFO]: http://unifiedfontobject.org/
|
@ -1,2 +0,0 @@
|
||||
lxml==4.2.5
|
||||
singledispatch==3.4.0.3; python_version < '3.4'
|
@ -1,3 +0,0 @@
|
||||
fonttools==3.30.0
|
||||
fs==2.1.1
|
||||
enum34==1.1.6; python_version < '3.4'
|
54
setup.cfg
54
setup.cfg
@ -1,54 +0,0 @@
|
||||
[bumpversion]
|
||||
current_version = 3.0.0
|
||||
commit = True
|
||||
tag = False
|
||||
tag_name = v{new_version}
|
||||
parse = (?P<major>\d+)\.(?P<minor>\d+)\.(?P<patch>\d+)(\.(?P<release>[a-z]+)(?P<dev>\d+))?
|
||||
serialize =
|
||||
{major}.{minor}.{patch}.{release}{dev}
|
||||
{major}.{minor}.{patch}
|
||||
|
||||
[bumpversion:part:release]
|
||||
optional_value = final
|
||||
values =
|
||||
dev
|
||||
final
|
||||
|
||||
[bumpversion:part:dev]
|
||||
|
||||
[bumpversion:file:Lib/ufoLib/__init__.py]
|
||||
search = __version__ = "{current_version}"
|
||||
replace = __version__ = "{new_version}"
|
||||
|
||||
[bumpversion:file:setup.py]
|
||||
search = version="{current_version}"
|
||||
replace = version="{new_version}"
|
||||
|
||||
[wheel]
|
||||
universal = 1
|
||||
|
||||
[sdist]
|
||||
formats = zip
|
||||
|
||||
[aliases]
|
||||
test = pytest
|
||||
|
||||
[metadata]
|
||||
license_file = LICENSE.txt
|
||||
|
||||
[tool:pytest]
|
||||
minversion = 3.0.2
|
||||
testpaths =
|
||||
ufoLib
|
||||
tests/
|
||||
doctest_optionflags = ALLOW_UNICODE ALLOW_BYTES
|
||||
filterwarnings =
|
||||
ignore:readPlist:DeprecationWarning:test_plistlib
|
||||
ignore:writePlist:DeprecationWarning:test_plistlib
|
||||
ignore:some_function:DeprecationWarning:utils
|
||||
addopts =
|
||||
-r a
|
||||
--doctest-modules
|
||||
--doctest-ignore-import-errors
|
||||
--pyargs
|
||||
|
207
setup.py
207
setup.py
@ -1,207 +0,0 @@
|
||||
#! /usr/bin/env python
|
||||
import sys
|
||||
from setuptools import setup, find_packages, Command
|
||||
from distutils import log
|
||||
|
||||
|
||||
class bump_version(Command):
|
||||
|
||||
description = "increment the package version and commit the changes"
|
||||
|
||||
user_options = [
|
||||
("major", None, "bump the first digit, for incompatible API changes"),
|
||||
("minor", None, "bump the second digit, for new backward-compatible features"),
|
||||
("patch", None, "bump the third digit, for bug fixes (default)"),
|
||||
]
|
||||
|
||||
def initialize_options(self):
|
||||
self.minor = False
|
||||
self.major = False
|
||||
self.patch = False
|
||||
|
||||
def finalize_options(self):
|
||||
part = None
|
||||
for attr in ("major", "minor", "patch"):
|
||||
if getattr(self, attr, False):
|
||||
if part is None:
|
||||
part = attr
|
||||
else:
|
||||
from distutils.errors import DistutilsOptionError
|
||||
raise DistutilsOptionError(
|
||||
"version part options are mutually exclusive")
|
||||
self.part = part or "patch"
|
||||
|
||||
def bumpversion(self, part, **kwargs):
|
||||
""" Run bumpversion.main() with the specified arguments.
|
||||
"""
|
||||
import bumpversion
|
||||
|
||||
args = ['--verbose'] if self.verbose > 1 else []
|
||||
for k, v in kwargs.items():
|
||||
k = "--{}".format(k.replace("_", "-"))
|
||||
is_bool = isinstance(v, bool) and v is True
|
||||
args.extend([k] if is_bool else [k, str(v)])
|
||||
args.append(part)
|
||||
|
||||
log.debug(
|
||||
"$ bumpversion %s" % " ".join(a.replace(" ", "\\ ") for a in args))
|
||||
|
||||
bumpversion.main(args)
|
||||
|
||||
def run(self):
|
||||
log.info("bumping '%s' version" % self.part)
|
||||
self.bumpversion(self.part)
|
||||
|
||||
|
||||
class release(bump_version):
|
||||
"""Drop the developmental release '.devN' suffix from the package version,
|
||||
open the default text $EDITOR to write release notes, commit the changes
|
||||
and generate a git tag.
|
||||
|
||||
Release notes can also be set with the -m/--message option, or by reading
|
||||
from standard input.
|
||||
"""
|
||||
|
||||
description = "tag a new release"
|
||||
|
||||
user_options = [
|
||||
("message=", 'm', "message containing the release notes"),
|
||||
]
|
||||
|
||||
def initialize_options(self):
|
||||
self.message = None
|
||||
|
||||
def finalize_options(self):
|
||||
import re
|
||||
|
||||
current_version = self.distribution.metadata.get_version()
|
||||
if not re.search(r"\.dev[0-9]+", current_version):
|
||||
from distutils.errors import DistutilsSetupError
|
||||
raise DistutilsSetupError(
|
||||
"current version (%s) has no '.devN' suffix.\n "
|
||||
"Run 'setup.py bump_version' with any of "
|
||||
"--major, --minor, --patch options" % current_version)
|
||||
|
||||
message = self.message
|
||||
if message is None:
|
||||
if sys.stdin.isatty():
|
||||
# stdin is interactive, use editor to write release notes
|
||||
message = self.edit_release_notes()
|
||||
else:
|
||||
# read release notes from stdin pipe
|
||||
message = sys.stdin.read()
|
||||
|
||||
if not message.strip():
|
||||
from distutils.errors import DistutilsSetupError
|
||||
raise DistutilsSetupError("release notes message is empty")
|
||||
|
||||
self.message = "v{new_version}\n\n%s" % message
|
||||
|
||||
@staticmethod
|
||||
def edit_release_notes():
|
||||
"""Use the default text $EDITOR to write release notes.
|
||||
If $EDITOR is not set, use 'nano'."""
|
||||
from tempfile import mkstemp
|
||||
import os
|
||||
import shlex
|
||||
import subprocess
|
||||
|
||||
text_editor = shlex.split(os.environ.get('EDITOR', 'nano'))
|
||||
|
||||
fd, tmp = mkstemp(prefix='bumpversion-')
|
||||
try:
|
||||
os.close(fd)
|
||||
with open(tmp, 'w') as f:
|
||||
f.write("\n\n# Write release notes.\n"
|
||||
"# Lines starting with '#' will be ignored.")
|
||||
subprocess.check_call(text_editor + [tmp])
|
||||
with open(tmp, 'r') as f:
|
||||
changes = "".join(
|
||||
l for l in f.readlines() if not l.startswith('#'))
|
||||
finally:
|
||||
os.remove(tmp)
|
||||
return changes
|
||||
|
||||
def run(self):
|
||||
log.info("stripping developmental release suffix")
|
||||
# drop '.dev0' suffix, commit with given message and create git tag
|
||||
self.bumpversion("release",
|
||||
tag=True,
|
||||
message="Release {new_version}",
|
||||
tag_message=self.message)
|
||||
|
||||
|
||||
needs_pytest = {'pytest', 'test'}.intersection(sys.argv)
|
||||
pytest_runner = ['pytest_runner'] if needs_pytest else []
|
||||
needs_wheel = {'bdist_wheel'}.intersection(sys.argv)
|
||||
wheel = ['wheel'] if needs_wheel else []
|
||||
needs_bump2version = {'release', 'bump_version'}.intersection(sys.argv)
|
||||
bump2version = ['bump2version'] if needs_bump2version else []
|
||||
|
||||
long_description = """\
|
||||
ufoLib reads and writes Unified Font Object (UFO) files.
|
||||
UFO is a file format that stores fonts source files.
|
||||
|
||||
http://unifiedfontobject.org
|
||||
"""
|
||||
|
||||
setup_params = dict(
|
||||
name="ufoLib",
|
||||
version="3.0.0",
|
||||
description="A low-level UFO reader and writer.",
|
||||
author="Just van Rossum, Tal Leming, Erik van Blokland, others",
|
||||
author_email="info@robofab.com",
|
||||
maintainer="Just van Rossum, Tal Leming, Erik van Blokland",
|
||||
maintainer_email="info@robofab.com",
|
||||
url="https://github.com/unified-font-object/ufoLib",
|
||||
license="MIT",
|
||||
platforms=["Any"],
|
||||
long_description=long_description,
|
||||
package_dir={'': 'Lib'},
|
||||
packages=find_packages('Lib'),
|
||||
include_package_data=True,
|
||||
setup_requires=pytest_runner + wheel + bump2version,
|
||||
tests_require=[
|
||||
'pytest>=3.0.2',
|
||||
],
|
||||
install_requires=[
|
||||
"fonttools >= 3.10.0, < 4",
|
||||
"fs >= 2.1.1, < 3",
|
||||
],
|
||||
extras_require={
|
||||
"lxml": [
|
||||
"lxml >= 4.0, < 5",
|
||||
"singledispatch >= 3.4.0.3, < 4; python_version < '3.4'",
|
||||
],
|
||||
"testing": [
|
||||
"pytest >= 3.0.0, <4",
|
||||
"pytest-cov >= 2.5.1, <3",
|
||||
"pytest-randomly >= 1.2.3, <2",
|
||||
],
|
||||
# conditional dependency syntax compatible with setuptools >= 18
|
||||
# https://hynek.me/articles/conditional-python-dependencies/
|
||||
# install 'enum34' backport on python < 3.4
|
||||
":python_version < '3.4'": ['enum34 ~= 1.1.6'],
|
||||
},
|
||||
cmdclass={
|
||||
"release": release,
|
||||
"bump_version": bump_version,
|
||||
},
|
||||
classifiers=[
|
||||
"Development Status :: 4 - Beta",
|
||||
"Environment :: Console",
|
||||
"Environment :: Other Environment",
|
||||
"Intended Audience :: Developers",
|
||||
"Intended Audience :: End Users/Desktop",
|
||||
"License :: OSI Approved :: MIT License",
|
||||
"Natural Language :: English",
|
||||
"Operating System :: OS Independent",
|
||||
"Programming Language :: Python",
|
||||
"Topic :: Multimedia :: Graphics",
|
||||
"Topic :: Multimedia :: Graphics :: Graphics Conversion",
|
||||
],
|
||||
)
|
||||
|
||||
|
||||
if __name__ == "__main__":
|
||||
setup(**setup_params)
|
71
tox.ini
71
tox.ini
@ -1,71 +0,0 @@
|
||||
[tox]
|
||||
envlist = py{27,37}-cov,py{27,37}-cov-lxml,coverage
|
||||
minversion = 2.9.1
|
||||
skip_missing_interpreters = true
|
||||
|
||||
[testenv]
|
||||
description = run the tests with pytest under {basepython}
|
||||
setenv =
|
||||
COVERAGE_FILE={toxinidir}/.coverage.{envname}
|
||||
deps =
|
||||
-rrequirements.txt
|
||||
lxml: -rextra_requirements.txt
|
||||
extras = testing
|
||||
commands =
|
||||
python --version
|
||||
python -c "import struct; print('%s-bit' % (struct.calcsize('P') * 8))"
|
||||
nocov: pytest {posargs}
|
||||
cov: pytest --cov="{envsitepackagesdir}/ufoLib" --cov-config={toxinidir}/.coveragerc {posargs}
|
||||
|
||||
[testenv:coverage]
|
||||
description = run locally after tests to combine coverage data and create reports;
|
||||
generates a diff coverage against origin/master (or DIFF_AGAINST env var)
|
||||
deps =
|
||||
coverage >= 4.4.1, < 5
|
||||
diff_cover
|
||||
skip_install = true
|
||||
setenv =
|
||||
COVERAGE_FILE={toxinidir}/.coverage
|
||||
passenv =
|
||||
DIFF_AGAINST
|
||||
changedir = {toxinidir}
|
||||
commands =
|
||||
coverage erase
|
||||
coverage combine
|
||||
coverage report
|
||||
coverage xml -o {toxworkdir}/coverage.xml
|
||||
coverage html
|
||||
diff-cover --compare-branch {env:DIFF_AGAINST:origin/master} {toxworkdir}/coverage.xml
|
||||
|
||||
[testenv:codecov]
|
||||
description = upload coverage data to codecov (only run on CI)
|
||||
deps =
|
||||
{[testenv:coverage]deps}
|
||||
codecov
|
||||
skip_install = true
|
||||
setenv = {[testenv:coverage]setenv}
|
||||
passenv = TOXENV CI TRAVIS TRAVIS_* APPVEYOR APPVEYOR_* CODECOV_*
|
||||
changedir = {toxinidir}
|
||||
commands =
|
||||
coverage combine
|
||||
codecov --env TOXENV
|
||||
|
||||
[testenv:sdist]
|
||||
description = build sdist to be uploaded to PyPI
|
||||
skip_install = true
|
||||
deps =
|
||||
setuptools >= 36.4.0
|
||||
wheel >= 0.31.0
|
||||
changedir = {toxinidir}
|
||||
commands =
|
||||
python -c 'import shutil; shutil.rmtree("dist", ignore_errors=True)'
|
||||
python setup.py sdist --dist-dir dist
|
||||
|
||||
[testenv:wheel]
|
||||
description = build wheel package for upload to PyPI
|
||||
skip_install = true
|
||||
deps = {[testenv:sdist]deps}
|
||||
changedir = {toxinidir}
|
||||
commands =
|
||||
{[testenv:sdist]commands}
|
||||
pip wheel -v --no-deps --no-index --no-cache-dir --wheel-dir {toxinidir}/dist --find-links {toxinidir}/dist ufoLib
|
Loading…
x
Reference in New Issue
Block a user