diff --git a/MANIFEST.in b/MANIFEST.in index 4e867a0..bc8dd2a 100644 --- a/MANIFEST.in +++ b/MANIFEST.in @@ -1,4 +1,3 @@ recursive-include mpyc *.py -recursive-exclude mpyc *.md include LICENSE include README.md \ No newline at end of file diff --git a/README.md b/README.md index de6a9b4..1068933 100644 --- a/README.md +++ b/README.md @@ -27,7 +27,7 @@ The [MPyC homepage](https://www.win.tue.nl/~berry/mpyc/) has some more info and Pure Python, no dependencies. Python 3.9+ (following [SPEC 0 -- Minimum Supported Dependencies](https://scientific-python.org/specs/spec-0000/)). -Run `pip install .` in the root directory (containing file `setup.py`).\ +Run `pip install .` in the root directory (containing file `pyproject.toml`).\ Or, run `pip install -e .`, if you want to edit the MPyC source files. Use `pip install numpy` to enable support for secure NumPy arrays in MPyC, along with vectorized implementations. diff --git a/docs/install.rst b/docs/install.rst index 871e4cb..01a7d13 100644 --- a/docs/install.rst +++ b/docs/install.rst @@ -44,7 +44,7 @@ the `MPyC repo `_ for a local copy including all This way it will also be easy to get updates and switch between versions. The same content is also available as a ZIP file `mpyc-master.zip `_. -From the root directory of your local copy (containing ``setup.py``) you may then run:: +From the root directory of your local copy (containing ``pyproject.toml``) you may then run:: pip install . diff --git a/mpyc/__init__.py b/mpyc/__init__.py index 6a94720..b8482fe 100644 --- a/mpyc/__init__.py +++ b/mpyc/__init__.py @@ -30,7 +30,6 @@ """ __version__ = '0.10.1' -__license__ = 'MIT License' import os import sys diff --git a/pyproject.toml b/pyproject.toml new file mode 100644 index 0000000..400d2c0 --- /dev/null +++ b/pyproject.toml @@ -0,0 +1,45 @@ +[build-system] +requires = ['setuptools>=62'] +build-backend = 'setuptools.build_meta' + +[tool.setuptools] +packages = ['mpyc'] + +[tool.setuptools.dynamic] +version = {attr = 'mpyc.__version__'} + +[project] +name = 'mpyc' +dynamic = ['version'] +authors = [{name = 'Berry Schoenmakers', email = 'berry@win.tue.nl'}] +description = 'MPyC for Multiparty Computation in Python' +readme = 'README.md' +keywords=['crypto', 'cryptography', 'multiparty computation', 'MPC', + 'secret sharing', 'Shamir threshold scheme', + 'pseudorandom secret sharing', 'PRSS'] +classifiers = [ + 'Development Status :: 4 - Beta', + 'Environment :: Console', + 'Framework :: AsyncIO', + 'Framework :: Jupyter', + 'Intended Audience :: Developers', + 'Intended Audience :: Education', + 'Intended Audience :: Information Technology', + 'Intended Audience :: Science/Research', + 'License :: OSI Approved :: MIT License', + 'Operating System :: OS Independent', + 'Programming Language :: Python :: 3 :: Only', + 'Topic :: Security :: Cryptography', + 'Topic :: Software Development :: Libraries :: Application Frameworks', + 'Topic :: Software Development :: Libraries :: Python Modules', + 'Topic :: System :: Distributed Computing' +] +license = {text = 'MIT License'} +requires-python = '>=3.9' + +[project.urls] +documentation = 'https://mpyc.readthedocs.io' +discussions = 'https://github.com/lschoe/mpyc/discussions' +'release notes' = 'https://github.com/lschoe/mpyc/releases' +homepage = 'https://www.win.tue.nl/~berry/mpyc/' +repository = 'https://github.com/lschoe/mpyc' diff --git a/setup.py b/setup.py deleted file mode 100644 index 613482a..0000000 --- a/setup.py +++ /dev/null @@ -1,46 +0,0 @@ -"""MPyC setup script. - -Run: "pip install ." -Or: "pip install -e ." -""" - -from setuptools import setup -import mpyc - -with open('README.md', 'r') as f: - LONG_DESCRIPTION = f.read() - -setup( - name='mpyc', - version=mpyc.__version__, - author='Berry Schoenmakers', - author_email='berry@win.tue.nl', - url='https://github.com/lschoe/mpyc', - description='MPyC for Multiparty Computation in Python', - long_description=LONG_DESCRIPTION, - long_description_content_type='text/markdown', - keywords=['crypto', 'cryptography', 'multiparty computation', 'MPC', - 'secret sharing', 'Shamir threshold scheme', - 'pseudorandom secret sharing', 'PRSS'], - classifiers=[ - 'Development Status :: 4 - Beta', - 'Environment :: Console', - 'Framework :: AsyncIO', - 'Framework :: Jupyter', - 'Intended Audience :: Developers', - 'Intended Audience :: Education', - 'Intended Audience :: Information Technology', - 'Intended Audience :: Science/Research', - 'License :: OSI Approved :: MIT License', - 'Operating System :: OS Independent', - 'Programming Language :: Python :: 3 :: Only', - 'Topic :: Security :: Cryptography', - 'Topic :: Software Development :: Libraries :: Application Frameworks', - 'Topic :: Software Development :: Libraries :: Python Modules', - 'Topic :: System :: Distributed Computing' - ], - license=mpyc.__license__, - packages=['mpyc'], - platforms=['any'], - python_requires='>=3.9' -)