-
Notifications
You must be signed in to change notification settings - Fork 134
Package python-ldap with pyproject.toml #589
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
Merged
Changes from all commits
Commits
Show all changes
3 commits
Select commit
Hold shift + click to select a range
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file was deleted.
Oops, something went wrong.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -3,8 +3,6 @@ | |
| *.pyc | ||
| __pycache__/ | ||
| .tox | ||
| .coverage* | ||
| !.coveragerc | ||
| /.cache | ||
| /.pytest_cache | ||
|
|
||
|
|
||
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,4 +1,108 @@ | ||
| [build-system] | ||
| requires = [ | ||
| "setuptools", | ||
| "setuptools-scm", | ||
| ] | ||
| build-backend = "setuptools.build_meta" | ||
|
|
||
| [project] | ||
| name = "python-ldap" | ||
| license.text = "python-ldap" # Replace with 'license' once Python 3.8 is dropped | ||
| dynamic = ["version"] | ||
| description = "Python modules for implementing LDAP clients" | ||
| authors = [ | ||
| {name = "python-ldap project", email = "[email protected]"}, | ||
| ] | ||
| readme = "README" | ||
| requires-python = ">=3.6" | ||
| keywords = ["ldap", "directory", "authentication"] | ||
| classifiers = [ | ||
| "Development Status :: 5 - Production/Stable", | ||
| "Intended Audience :: Developers", | ||
| "Intended Audience :: System Administrators", | ||
| "Operating System :: OS Independent", | ||
| "Operating System :: MacOS :: MacOS X", | ||
| "Operating System :: Microsoft :: Windows", | ||
| "Operating System :: POSIX", | ||
| "Programming Language :: C", | ||
| "Programming Language :: Python", | ||
| "Programming Language :: Python :: 3", | ||
| "Programming Language :: Python :: 3.6", | ||
| "Programming Language :: Python :: 3.7", | ||
| "Programming Language :: Python :: 3.8", | ||
| "Programming Language :: Python :: 3.9", | ||
| "Programming Language :: Python :: 3.10", | ||
| "Programming Language :: Python :: 3.11", | ||
| "Programming Language :: Python :: 3.12", | ||
| "Programming Language :: Python :: 3.13", | ||
| "Topic :: Database", | ||
| "Topic :: Internet", | ||
| "Topic :: Software Development :: Libraries :: Python Modules", | ||
| "Topic :: System :: Systems Administration :: Authentication/Directory :: LDAP", | ||
| "License :: OSI Approved :: Python Software Foundation License", | ||
| ] | ||
| dependencies = [ | ||
| "pyasn1 >= 0.3.7", | ||
| "pyasn1_modules >= 0.1.5", | ||
| ] | ||
|
|
||
| [project.urls] | ||
| Homepage = "https://www.python-ldap.org/" | ||
| Documentation = "https://python-ldap.readthedocs.io/" | ||
| Repository = "https://github.com/python-ldap/python-ldap" | ||
| Download = "https://pypi.org/project/python-ldap/" | ||
| Changelog = "https://github.com/python-ldap/python-ldap/blob/main/CHANGES" | ||
|
|
||
|
|
||
|
|
||
| [tool.setuptools] | ||
| zip-safe = false | ||
| include-package-data = true | ||
| license-files = ["LICENCE", "LICENCE.MIT"] | ||
| # Explicitly list all Python modules | ||
| py-modules = ["ldapurl", "ldif"] | ||
|
|
||
| [tool.setuptools.dynamic] | ||
| version = {attr = "ldap.pkginfo.__version__"} | ||
|
|
||
| [tool.setuptools.packages.find] | ||
| where = ["Lib"] | ||
|
|
||
| [tool.setuptools.package-dir] | ||
| "" = "Lib" | ||
|
|
||
| [tool.isort] | ||
| line_length=88 | ||
| known_first_party=['ldap', '_ldap', 'ldapurl', 'ldif', 'slapdtest'] | ||
| sections=['FUTURE', 'STDLIB', 'THIRDPARTY', 'FIRSTPARTY', 'LOCALFOLDER'] | ||
| line_length = 88 | ||
| known_first_party = ["ldap", "_ldap", "ldapurl", "ldif", "slapdtest"] | ||
| sections = ["FUTURE", "STDLIB", "THIRDPARTY", "FIRSTPARTY", "LOCALFOLDER"] | ||
|
|
||
| [tool.coverage.run] | ||
| branch = true | ||
| source = [ | ||
| "ldap", | ||
| "ldif", | ||
| "ldapurl", | ||
| "slapdtest", | ||
| ] | ||
|
|
||
| [tool.coverage.paths] | ||
| source = [ | ||
| "Lib/", | ||
| ".tox/*/lib/python*/site-packages/", | ||
| ] | ||
|
|
||
| [tool.coverage.report] | ||
| ignore_errors = false | ||
| precision = 1 | ||
| exclude_lines = [ | ||
| "pragma: no cover", | ||
| "raise NotImplementedError", | ||
| "if 0:", | ||
| "if __name__ == .__main__.:", | ||
| "if PY2", | ||
| "if not PY2", | ||
| ] | ||
|
|
||
| [tool.coverage.html] | ||
| directory = "build/htmlcov" | ||
| title = "python-ldap coverage report" | ||
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,7 +1,9 @@ | ||
| """ | ||
| setup.py - Setup package with the help Python's DistUtils | ||
| setup.py - C extension module configuration for python-ldap | ||
|
|
||
| See https://www.python-ldap.org/ for details. | ||
| This file handles only the C extension modules (_ldap) configuration, | ||
| while pyproject.toml handles all project metadata, dependencies, and other settings. | ||
| """ | ||
|
|
||
| import sys,os | ||
|
|
@@ -54,52 +56,8 @@ class OpenLDAP2: | |
| LDAP_CLASS.extra_link_args.append('-pg') | ||
| LDAP_CLASS.libs.append('gcov') | ||
|
|
||
| #-- Let distutils/setuptools do the rest | ||
| name = 'python-ldap' | ||
|
|
||
| #-- C extension modules configuration only | ||
| setup( | ||
| #-- Package description | ||
| name = name, | ||
| license=pkginfo.__license__, | ||
| version=pkginfo.__version__, | ||
| description = 'Python modules for implementing LDAP clients', | ||
| long_description = """python-ldap: | ||
| python-ldap provides an object-oriented API to access LDAP directory servers | ||
| from Python programs. Mainly it wraps the OpenLDAP 2.x libs for that purpose. | ||
| Additionally the package contains modules for other LDAP-related stuff | ||
| (e.g. processing LDIF, LDAPURLs, LDAPv3 schema, LDAPv3 extended operations | ||
| and controls, etc.). | ||
| """, | ||
| author = 'python-ldap project', | ||
| author_email = '[email protected]', | ||
| url = 'https://www.python-ldap.org/', | ||
| download_url = 'https://pypi.org/project/python-ldap/', | ||
| classifiers = [ | ||
| 'Development Status :: 5 - Production/Stable', | ||
| 'Intended Audience :: Developers', | ||
| 'Intended Audience :: System Administrators', | ||
| 'Operating System :: OS Independent', | ||
| 'Operating System :: MacOS :: MacOS X', | ||
| 'Operating System :: Microsoft :: Windows', | ||
| 'Operating System :: POSIX', | ||
| 'Programming Language :: C', | ||
|
|
||
| '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', | ||
| 'Programming Language :: Python :: 3.13', | ||
| # Note: when updating Python versions, also change tox.ini and .github/workflows/* | ||
|
|
||
| 'Topic :: Database', | ||
| 'Topic :: Internet', | ||
| 'Topic :: Software Development :: Libraries :: Python Modules', | ||
| 'Topic :: System :: Systems Administration :: Authentication/Directory :: LDAP', | ||
| 'License :: OSI Approved :: Python Software Foundation License', | ||
| ], | ||
| #-- C extension modules | ||
| ext_modules = [ | ||
| Extension( | ||
| '_ldap', | ||
|
|
@@ -135,28 +93,4 @@ class OpenLDAP2: | |
| ] | ||
| ), | ||
| ], | ||
| #-- Python "stand alone" modules | ||
| py_modules = [ | ||
| 'ldapurl', | ||
| 'ldif', | ||
|
|
||
| ], | ||
| packages = [ | ||
| 'ldap', | ||
| 'ldap.controls', | ||
| 'ldap.extop', | ||
| 'ldap.schema', | ||
| 'slapdtest', | ||
| 'slapdtest.certs', | ||
| ], | ||
| package_dir = {'': 'Lib',}, | ||
| data_files = LDAP_CLASS.extra_files, | ||
| include_package_data=True, | ||
| install_requires=[ | ||
| 'pyasn1 >= 0.3.7', | ||
| 'pyasn1_modules >= 0.1.5', | ||
| ], | ||
| zip_safe=False, | ||
| python_requires='>=3.9', | ||
| test_suite = 'Tests', | ||
| ) | ||
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is not related and should be done in a separate commit at least.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It's just a move of a coverage tool to pyproject.toml. I'd rather do it as part of this PR.