Skip to content

Commit

Permalink
Adjust package metadata/dependencies; add tagging to README publishin…
Browse files Browse the repository at this point in the history
…g steps.
  • Loading branch information
lapets committed Jul 17, 2022
1 parent bd9f632 commit 9a2653e
Show file tree
Hide file tree
Showing 3 changed files with 17 additions and 14 deletions.
15 changes: 10 additions & 5 deletions README.rst
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,7 @@ The number of shares can be specified explicitly (the default is two shares)::
>>> (r, s, t) = shares(bytes([1, 2, 3]), quantity=3)

.. |xor| replace:: ``xor``
.. _xor: https://exclusive.readthedocs.io/en/latest/_source/exclusive.html#exclusive.exclusive.xor
.. _xor: https://exclusive.readthedocs.io/en/0.2.0/_source/exclusive.html#exclusive.exclusive.xor

.. |sum| replace:: ``sum``
.. _sum: https://docs.python.org/3/library/functions.html#sum
Expand All @@ -67,7 +67,7 @@ For convenience, an |xor|_ operator that is analogous to Python's built-in |sum|
'050705

.. |share| replace:: ``share``
.. _share: https://exclusive.readthedocs.io/en/latest/_source/exclusive.html#exclusive.exclusive.share
.. _share: https://exclusive.readthedocs.io/en/0.2.0/_source/exclusive.html#exclusive.exclusive.share

The |share|_ class is derived from the |bytes|_ class. Thus, all methods, operators, and functions that operate on bytes-like objects are supported for |share|_ objects. The |xor|_ operator provided by the library relies on Python's `built-in exclusive or operator <https://docs.python.org/3/reference/expressions.html#binary-bitwise-operations>`__ and can be used for concise reconstruction of values from a collection of secret shares::

Expand Down Expand Up @@ -106,7 +106,7 @@ Alternatively, all unit tests are included in the module itself and can be execu

python src/exclusive/exclusive.py -v

Style conventions are enforced using `Pylint <https://www.pylint.org>`__::
Style conventions are enforced using `Pylint <https://pylint.pycqa.org>`__::

python -m pip install .[lint]
python -m pylint src/exclusive
Expand All @@ -125,11 +125,16 @@ This library can be published as a `package on PyPI <https://pypi.org/project/ex

python -m pip install .[publish]

Remove any old build/distribution files and package the source into a distribution archive::
Ensure that the correct version number appears in ``pyproject.toml``, and that any links in this README document to the Read the Docs documentation of this package (or its dependencies) have appropriate version numbers. Also ensure that the Read the Docs project for this library has an `automation rule <https://docs.readthedocs.io/en/stable/automation-rules.html>`__ that activates and sets as the default all tagged versions. Create and push a tag for this version (replacing ``?.?.?`` with the version number)::

git tag ?.?.?
git push origin ?.?.?

Remove any old build/distribution files. Then, package the source into a distribution archive::

rm -rf build dist src/*.egg-info
python -m build --sdist --wheel .

Finally, upload the package distribution archive to `PyPI <https://pypi.org>`__ using the `twine <https://pypi.org/project/twine>`__ package::
Finally, upload the package distribution archive to `PyPI <https://pypi.org>`__::

python -m twine upload dist/*
4 changes: 2 additions & 2 deletions docs/conf.py
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
#
import os
import sys
sys.path.insert(0, os.path.abspath('../src'))
sys.path.insert(0, os.path.abspath('../src')) # Prioritize local module copy.


# -- Project information -----------------------------------------------------
Expand Down Expand Up @@ -73,7 +73,7 @@

# Allow references/links to definitions found in the Python documentation.
intersphinx_mapping = {
'python': ('https://docs.python.org/3', None)
'python': ('https://docs.python.org/3', None),
}


Expand Down
12 changes: 5 additions & 7 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ description = """\
bitwise XOR, designed for use within secure multi-party computation (MPC) \
protocol implementations.\
"""
license = {file = "LICENSE"}
license = {text = "MIT"}
authors = [
{name = "Andrei Lapets"},
{email = "[email protected]"}
Expand All @@ -15,9 +15,8 @@ readme = "README.rst"
requires-python = ">=3.7"

[project.urls]
homepage = "https://github.com/nthparty/exclusive"
repository = "https://github.com/nthparty/exclusive"
documentation = "https://exclusive.readthedocs.org"
Repository = "https://github.com/nthparty/exclusive"
Documentation = "https://exclusive.readthedocs.io"

[project.optional-dependencies]
docs = [
Expand All @@ -36,14 +35,13 @@ coveralls = [
"coveralls~=3.3.1"
]
publish = [
"build~=0.8",
"twine~=4.0"
]

[build-system]
requires = [
"build~=0.8",
"setuptools~=62.0",
"wheel~=0.37"
"setuptools~=62.0"
]
build-backend = "setuptools.build_meta"

Expand Down

0 comments on commit 9a2653e

Please sign in to comment.