Skip to content

Commit

Permalink
Initial python packages
Browse files Browse the repository at this point in the history
  • Loading branch information
jleni committed Sep 17, 2017
1 parent 0d36616 commit f843923
Show file tree
Hide file tree
Showing 8 changed files with 150 additions and 1 deletion.
23 changes: 23 additions & 0 deletions .coveragerc
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
# .coveragerc to control coverage.py
[run]
branch = True
source = pyqrllib
# omit = bad_file.py

[report]
# Regexes for lines to exclude from consideration
exclude_lines =
# Have to re-enable the standard pragma
pragma: no cover

# Don't complain about missing debug-only code:
def __repr__
if self\.debug

# 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__.:
2 changes: 1 addition & 1 deletion LICENSE
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@

The MIT License (MIT)

Copyright (c) 2017
Copyright (c) 2017 The Quantum Resistant Ledger

Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
Expand Down
9 changes: 9 additions & 0 deletions README.pypi
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
Python-based blockchain ledger utilising hash-based one-time merkle tree signature scheme (XMSS) instead of ECDSA. Proof-of-stake block selection via a signed iterative hash chain reveal scheme which is both probabilistic and random (https://github.com/theQRL/pos).

Hash-based signatures means larger transactions (6kb per tx, binary), longer keypair generation times and the need to record 'state' of transactions as each keypair can only be used once safely. Merkle tree usage enables a single address to be used for signing numerous transactions (up to 2^13 computationally easily enough). Transactions have an incremented nonce to allow wallets to know which MSS keypair to use - currently Lamport-Diffie and Winternitz one-time signatures as part of merkle signature schemes and XMSS/W-OTS+ are natively supported.






4 changes: 4 additions & 0 deletions requirements.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
# Add your requirements here like:
# numpy
# scipy>=0.9

82 changes: 82 additions & 0 deletions setup.cfg
Original file line number Diff line number Diff line change
@@ -0,0 +1,82 @@
[metadata]
name = pyqrllib
summary = QRL core library
author = The Quantum Resistant Ledger
author-email = info@theQRL.org
license = MIT
home-page = http://theqrl.org
description-file = README.pypi

# Add here all kinds of additional classifiers as defined under
# https://pypi.python.org/pypi?%3Aaction=list_classifiers
classifier =
Development Status :: 3 - Alpha
Programming Language :: Python
Programming Language :: Python :: 3
Programming Language :: Python :: 3.5

[entry_points]
# Add here console scripts like:
# console_scripts =
# script_name = pyqrllib.module:function
# For example:
# console_scripts =
# fibonacci = pyqrllib.skeleton:run
# as well as other entry_points.


[files]
# Add here 'data_files', 'packages' or 'namespace_packages'.
# Additional data files are defined as key value pairs of target directory
# and source location from the root of the repository:
packages =
pyqrllib
# data_files =
# share/pyqrllib_docs = docs/*

[extras]
# Add here additional requirements for extra features, like:
# PDF =
# ReportLab>=1.2
# RXP

[test]
# py.test options when running `python setup.py test`
addopts = src/tests_python

[tool:pytest]
# Options for py.test:
# Specify command line options as you would do when invoking py.test directly.
# e.g. --cov-report html (or xml) for html/xml output or --junitxml junit.xml
# in order to write a coverage file that can be read by Jenkins.
addopts =
--doctest-modules -s
--cov qrl --cov-report term-missing --cov-report xml
--verbose

[aliases]
docs = build_sphinx

[bdist_wheel]
# Use this option if your package is pure-python
universal = 0

[build_sphinx]
source_dir = docs
build_dir = docs/_build

[pbr]
# Let pbr run sphinx-apidoc
#autodoc_tree_index_modules = True
# autodoc_tree_excludes = ...
# Let pbr itself generate the apidoc
# autodoc_index_modules = True
# autodoc_exclude_modules = ...
# Convert warnings to errors
# warnerrors = True

[devpi:upload]
# Options for the devpi: PyPI server and packaging tool
# VCS export must be deactivated since we are using setuptools-scm
no-vcs = 1
formats = bdist_wheel
23 changes: 23 additions & 0 deletions setup.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
#!/usr/bin/env python
# -*- coding: utf-8 -*-
"""
Setup file for pyqrllib.
This file was generated with PyScaffold 2.5.8, a tool that easily
puts up a scaffold for your new Python project. Learn more under:
http://pyscaffold.readthedocs.org/
"""

import sys
from setuptools import setup


def setup_package():
needs_sphinx = {'build_sphinx', 'upload_docs'}.intersection(sys.argv)
sphinx = ['sphinx'] if needs_sphinx else []
setup(setup_requires=['six', 'pyscaffold>=2.5a0,<2.6a0'] + sphinx,
use_pyscaffold=True)


if __name__ == "__main__":
setup_package()
5 changes: 5 additions & 0 deletions test-requirements.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
# Add requirements only needed for your unittests and during development here.
# They will be installed automatically when running `python setup.py test`.
# ATTENTION: Don't remove pytest-cov and pytest as they are needed.
pytest-cov
pytest
3 changes: 3 additions & 0 deletions travis/Dockerfile.xenial
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,9 @@ RUN apt-get -y install python3-pip python3.5-dev
RUN apt-get -y install git
RUN pip3 install --upgrade pip
RUN pip3 install --upgrade cmake
RUN pip3 install -U setuptools twine
RUN pip3 install -U PyScaffold==2.5.8
RUN pip3 install cibuildwheel==0.5.1
RUN apt-get -y install swig3.0


Expand Down

0 comments on commit f843923

Please sign in to comment.