Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
40 changes: 40 additions & 0 deletions pyproject.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,40 @@
[build-system]
requires = ["setuptools>=68.1", "wheel", "cython"]
build-backend = "setuptools.build_meta"

[project]
name = "python-pkcs11"
version = "0.7.0"
description = "PKCS#11 support for Python"
readme = "README.md"
authors = [
{name = "Andrey Kislyuk", email = "[email protected]"},
{name = "Danielle Madeley", email = "[email protected]"},
]
maintainers = [
{name = "Andrey Kislyuk", email = "[email protected]"},
]
classifiers = [
"License :: OSI Approved :: MIT License",
"Programming Language :: Python",
"Programming Language :: Python :: 3",
"Programming Language :: Python :: 3.9",
"Programming Language :: Python :: 3.10",
"Programming Language :: Python :: 3.11",
"Programming Language :: Python :: 3.12",
"Topic :: Security :: Cryptography",
]
dependencies = [
"asn1crypto>=1.4.0",
]
license = {text = "MIT License"}
requires-python = ">=3.9"

[project.urls]
Homepage = "http://python-pkcs11.readthedocs.io/en/latest/"
Documentation = "http://python-pkcs11.readthedocs.io/en/latest/"
Issues = "https://github.com/pyauth/python-pkcs11/issues"
Repository = "https://github.com/pyauth/python-pkcs11"

[tool.setuptools.packages.find]
include = ["pkcs11*"]
3 changes: 0 additions & 3 deletions requirements.in

This file was deleted.

10 changes: 1 addition & 9 deletions requirements.txt
Original file line number Diff line number Diff line change
@@ -1,9 +1 @@
#
# This file is autogenerated by pip-compile
# To update, run:
#
# pip-compile --output-file=requirements.txt requirements.in
#
aenum==2.0.7 ; python_version < "3.6"
asn1crypto==1.4.0
cached-property==1.5.2; python_version < "3.8"
-e .
72 changes: 18 additions & 54 deletions setup.py
Original file line number Diff line number Diff line change
@@ -1,61 +1,25 @@
#!/usr/bin/env python
"""
setup.py
"""
# Add cython extension module to build configuration.
#
# See also: https://setuptools.pypa.io/en/latest/userguide/ext_modules.html

from setuptools import setup, find_packages
from setuptools.extension import Extension
from setuptools import Extension, setup
import platform

# if compiling using MSVC, we need to link against user32 library
if platform.system() == 'Windows':
libraries = ['user32',]
else:
libraries = []

if __name__ == '__main__':
with \
open('requirements.in') as requirements, \
open('README.rst') as readme:

ext_modules = [
Extension('pkcs11._pkcs11',
sources=[
'pkcs11/_pkcs11.pyx',
],
libraries=libraries,
),
]
libraries = []

setup(
name='python-pkcs11',
description='PKCS#11 (Cryptoki) support for Python',
use_scm_version=True,
author='Danielle Madeley',
author_email='[email protected]',
url='https://github.com/danni/python-pkcs11',
long_description=readme.read(),
classifiers=[
'License :: OSI Approved :: MIT License',
'Programming Language :: Python',
'Programming Language :: Python :: 3',
'Programming Language :: Python :: 3.5',
'Programming Language :: Python :: 3.6',
'Programming Language :: Python :: 3.7',
'Programming Language :: Python :: 3.8',
'Topic :: Security :: Cryptography',
],
# if compiling using MSVC, we need to link against user32 library
if platform.system() == "Windows":
libraries.append("user32")

packages=find_packages(exclude=['tests']),
include_package_data=True,
ext_modules=ext_modules,

install_requires=requirements.readlines(),
setup_requires=[
'cython',
'setuptools >= 18.0',
'setuptools_scm',
setup(
ext_modules=[
Extension(
name="pkcs11._pkcs11",
sources=[
"pkcs11/_pkcs11.pyx",
],

test_suite='tests',
)
libraries=libraries,
),
],
)