Packaging

This commit is contained in:
Tony Garnock-Jones 2018-11-15 07:09:35 +00:00
parent da10d47d64
commit 9b4b548896
6 changed files with 46 additions and 7 deletions

View File

@ -1,3 +1,6 @@
*.pyc *.pyc
.coverage .coverage
htmlcov/ htmlcov/
build/
dist/
*.egg-info/

View File

@ -1,14 +1,18 @@
test: test:
python2 -m unittest test_preserves python2 -m unittest preserves.test_preserves
python3 -m unittest test_preserves python3 -m unittest preserves.test_preserves
coverage: coverage:
python2-coverage run --branch -m unittest test_preserves python2-coverage run --branch -m unittest preserves.test_preserves
python3-coverage run --branch -m unittest test_preserves python3-coverage run --branch -m unittest preserves.test_preserves
python3-coverage html python3-coverage html
clean: clean:
rm -rf htmlcov rm -rf htmlcov
rm -rf __pycache__ find . -iname __pycache__ -o -iname '*.pyc' | xargs rm -rf
rm -f *.pyc
rm -f .coverage rm -f .coverage
rm -rf preserves.egg-info build dist
publish:
python3 setup.py sdist bdist_wheel
twine upload dist/*

View File

@ -0,0 +1,8 @@
from .preserves import Float, Symbol, Record, ImmutableDict
from .preserves import DecodeError, EncodeError
from .preserves import Decoder, Encoder
from .preserves import Stream, ValueStream, SequenceStream, SetStream, DictStream
from .preserves import BinaryStream, StringStream, SymbolStream

View File

@ -1,4 +1,4 @@
from preserves import * from .preserves import *
import unittest import unittest
if isinstance(chr(123), bytes): if isinstance(chr(123), bytes):

View File

@ -0,0 +1,24 @@
try:
from setuptools import setup
except ImportError:
from distutils.core import setup
setup(
name="preserves",
version="0.0.0",
author="Tony Garnock-Jones",
author_email="tonyg@leastfixedpoint.com",
license="GNU General Public License v3 or later (GPLv3+)",
classifiers=[
"Development Status :: 3 - Alpha",
"Intended Audience :: Developers",
"Topic :: Software Development :: Libraries :: Python Modules",
"License :: OSI Approved :: GNU General Public License v3 or later (GPLv3+)",
"Programming Language :: Python :: 3",
],
packages=["preserves"],
url="https://gitlab.com/tonyg/preserves",
description="Experimental data serialization format",
install_requires=[],
python_requires=">=3.6, <4",
)