Saravanan666/pypi-org huggingface dataset:
Package: setuptools-build-subpackage
Package a subfolder as a python distributionFree software: Apache Software License 2.0Installationpip install setuptools-build-subpackageYou can also install the in-development version with:pip install https://github.com/ashb/setuptools-build-subpackage/archive/master.zipUsageThis distribution contains a subclass of setuptools’s Distribution, designed to build a “sub-module” as a stand alone distribution.It is designed to be used withsetuptools’s declrative config– i.e. where everything is defined in setup.cfg, not in setup.pyFor example, take the following layout:├── example
│   ├── __init__.py
│   ├── sub_module_a
│   │   ├── __init__.py
│   │   ├── setup.cfg
│   │   └── where.py
│   └── sub_module_b
│       ├── __init__.py
│       ├── setup.cfg
│       └── where.py
└── setup.cfgThis assumes we wantexample.sub_module_aandexample.sub_module_bnot included in the main distribution, but instead released as separate dists to PyPI.This set of classes ensures the following:That the top levelsetup.cfgis not loaded, instead only the one specified from the sub-packageThat thebuild/folder for each sub-package is kept clean, so files from one build don’t leak in to anotherThat thesetup.cfgfrom the sub-folder is present in the builtsdistat the top level, meaning it can be installed normally.That astubsetup.py file is included for compatibility with older installersConfigure your main distFirst you should exclude the sub-packages from being included in your main dist:setup(...packages=find_packages(exclude=['example.sub_module_*']))or[options.packages.find]exclude=example.sub_module_*Create a setup.cfg for your sub-distThe requirements and information for the subdist are all driven off a setup.cfg – right now a sub-setup.pyis not supported. (Thesetup.pyincluded in the sdist will always be generated. PRs welcome if you need something else here.)Seeexample/sub_module_a/setup.cfgin the source code for a minimal example.All file paths and module names are absolute, not relative to the location of thesetup.cfgfileBuild the sdist/bdistRun the following command:python-msetuptools_build_subpackage\--subpackage-folderexample/sub_module_b\sdist\bdist_wheelThis will create a .tar.ga and .whl file in distIncluding a license commentIf you need a license comment in the generatedsetup.py, pass the--license-templateoption tosdistpython-msetuptools_build_subpackage\--subpackage-folderexample/sub_module_b\sdist--license-template./LICENSE\bdist_wheelThis argument should be a path to a plain-text license file, that will be included at the top of the generated file, each line prefixed with a python comment.DevelopmentTo run all the tests run:pip install -e '.[devel]' && pytestIt is also recommended that you install pre-commit to check style rulesChangelog1.0.0 (2021-04-23)First release on PyPI.
Package: setuptools_bzr
setuptools_bzr - A setuptools plugin for BazaarCopyright (C) 2007-2008 by Barry A. WarsawLicensed under the terms of the LGPL v2.License=======This program is free software; you can redistribute it and/or modify it underthe terms of the GNU Lesser General Public License as published by the FreeSoftware Foundation; either version 2 of the License, or (at your option) anylater version.This program is distributed in the hope that it will be useful, but WITHOUTANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESSFOR A PARTICULAR PURPOSE.  See the GNU Lesser General Public License for moredetails.You should have received a copy of the GNU Lesser General Public License alongwith this program; if not, write to the Free Software Foundation, Inc., 51Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.Description===========Python's setuptools_ package provides a higher-level API for building Pythonpackages, integrating with the Cheeseshop_ and for building compactdistribution packages such as eggs_.  By default, setuptools supportsSubversion_ and CVS_.  The setuptools_bzr package extends this support toprojects maintained under the `Bazaar distributed revision control system`_... _setuptools: http://peak.telecommunity.com/DevCenter/setuptools.. _Cheeseshop: http://pypi.python.org.. _eggs: http://peak.telecommunity.com/DevCenter/PythonEggs.. _Subversion: http://subversion.tigris.org/.. _CVS: http://www.nongnu.org/cvs/.. _`Bazaar distributed revision control system`: http://bazaar-vcs.orgUsage=====Use the setuptools_bzr plugin by adding the following to your `setup()`function::setup_requires = ['setuptools_bzr',],See this package's own `setup.py` file for an example.  You must either havebzrlib_ installed in your Python or access to the `bzr(1)` command lineprogram.Contact information===================Author: Barry Warsaw <barry@python.org>Maintainer: Richard Gomes <rgomes.info@gmail.com>This package is developed on Launchpad_.  Please see the `project page`_ forsubmitting bug reports... _Launchpad: http://launchpad.net.. `project page`_: https://launchpad.net/setuptoolsbzr
Package: setuptools-certificate
Setuptools Certificate Metadata Extension⚠️ This package has been permanently moved to theotumatpackage and will no longer be maintained here. Make sure to update any dependency accordingly.This is a setuptools extension that provides new keyword argumentsprivkey_pathandpubkey_path.By specifying theprivkey_path, setuptools will generate the git hash (SHA1) of the module directory and sign the output based on the PEM key path passed in. The resulting signature will be stored as egg metadata{{module_name}}.sigaccessible viapkg_resourcesmodule.If passingpubkey_path, this will simply be copied in as egg metadata{{module_name}}.pub.This provides a solution to determining the 'trust-worthiness' of plugins or extensions that may be developed by the community for a given pip package if the public key file is available for the RSA keypair. The choice of what to do for failed verification is up to you.UseExtensible Package e.g.basesetuptools.setup(...setup_requires=['setuptools_certificate'],pubkey_path='./pubkey.pem',...Plugin Package e.g.plugin1setuptools.setup(...setup_requires=['setuptools_certificate'],privkey_path='~/keys/privkey.pem',...Verifying Contentsimportpkg_resourcesfrompathlibimportPathfromsetuptools_certificateimporthash_pkg,verifybase_name='base'plugin_name='plugin1'base_meta=pkg_resources.get_distribution(base_name)plugin_meta=pkg_resources.get_distribution(plugin_name)data=hash_pkg(str(Path(plugin_meta.module_path,plugin_name)))signature=plugin_meta.get_metadata('{}.sig'.format(plugin_name))pubkey_path=str(Path(base_meta.egg_info,'{}.pub'.format(base_name)))verify(pubkey_path,data,signature)Compatibility withgitandopensslCLIFor reference, certificates may also be generated and verified usinggitandopensslby the following process:Generate$cd{{/path/to/local/repo/dir}}$gitadd.--all
$GIT_HASH=$(gitls-files-s{{/pip/package/dir}}|githash-object--stdin)$printf$GIT_HASH|openssldgst-sha256-sign{{/path/to/privkey/pem}}-out{{pip_package_name}}.sigbin-sigoptrsa_padding_mode:pss
$opensslenc-base64-in{{pip_package_name}}.sigbin-out{{pip_package_name}}.sig
$rm{{pip_package_name}}.sigbin
$gitresetVerify$cd{{/path/to/local/repo/dir}}$gitadd.--all
$GIT_HASH=$(gitls-files-s{{/pip/package/dir}}|githash-object--stdin)$opensslenc-base64-d-in{{pip_package_name}}.sig-out{{pip_package_name}}.sigbin
$printf$GIT_HASH|openssldgst-sha256-verify{{/path/to/pubkey/pem}}-signature{{pip_package_name}}.sigbin-sigoptrsa_padding_mode:pss
$rm{{pip_package_name}}.sigbin
$gitreset
Package: setuptools-changelog-shortener
setuptools-changelog-shortenerThis setuptools plugin allows shortening the number of changelog entries to use for thelong_descriptionmetadata in Python packages.UsageFirst, ensure thatsetuptools_changelog_shorteneris present in your build requirements.# pyproject.toml[build-system]requires=["setuptools>=45","wheel","setuptools_changelog_shortener"]To enable changelog shortening, add the following section to yourpyproject.toml:# pyproject.toml[tool.setuptools_changelog_shortener]read_from="CHANGELOG.rst"write_to="CHANGELOG.short.rst"Then you use theCHANGELOG.short.rstfile for yourlong_descriptionmetadata field.Additional options are:countThe number of changelog entries to include.
Defaults to5.delimiterThe delimiter to look for in each entry.
Defaults to the^--+regular expression to find docutils titles using-characters.titleThe title to add to the top of the shortened CHANGELOG file.
Defaults toChangelog\n=========.Changelog0.2.0 (unreleased)Fix error whencountis bigger or equal the number of changelog entries.Addtomlito build requirements.0.1.0 (2022-02-07)Initial release.
Package: setuptools-ci
Setuptools continuous integration commandThis package adds continuous integration tools for setup.py.It will install :nosefor unit testingnosexcoverfor code coveragesetuptools-clonediggerfor detecting similar codesetuptools-flakesfor analyze and detect various errorssetuptools-lintfor code qualitysetuptools-sloccountfor counting physical source lines of codeUsagepython setup.py ciWill execute all commands. See each command documentation for configuration.And voilà!News0.1Release date: 6-Jun-2012First release
Package: setuptools-clonedigger
Setuptools clonedigger commandThis package adds clonedigger command to setup.py.Usagepython setup.py clonediggerDifferences with the standalone libraryIn order to not conflict with other setuptools commands, some options differ
from the original library.all options are prefixed by clonedigger-, so short options are disabledoriginaloutputandcpd-outputwere replaced by a singleclonedigger-fileNews0.1Release date: 5-Jun-2012First release
Package: setuptools-cmake
# Cmake meets setuptools## Try the exampleThe example modulefoocontains the methodsaddandinverse.
Theinversemethod is part of an external C/C++ library against
which is linked after module compilation.### Build the example module`bash cd example ``bash python3 setup.py bdist_wheel # build as wheel python3 setup.py build_ext-i# buildin-place`### Test the example module`bash python3-c"import foo;print(foo.inverse(0.5))"`This should compile the static librarydeadbeef,
compile thefoo.barsubmodule and print2.0upon execution.
Package: setuptools-cmd-deps
setuptools-cmd-depsConfiguresetuptoolscommand dependencies easily.Why I need this pluginOnce a customsetuptoolscommand is defined and needs to be run before some build-in command,
traditionally, there's no simple way and the solution is to override the build-in command,
to call the new custom command before the command implemented in the super class.In this way, having an additional class and digging intosetuptools,
are just to configure the command order or dependency.This could be simplified by usingsetuptools-cmd-deps:
enable the plugin and add custom configuration.Command dependency in the projectIf your command is just for the project and it won't be reused,
you could use new setup keywordcmd_depsto define the dependencies.Enable setuptools-cmd-depsIf yoursetup.pywill run only after all depending packages are installed,
addsetuptools-cmd-depsin your dependency list,
such asrequirements.txt, orPipfile.If yoursetup.pysupports running out of venv,
you may not want these packages to be installed in the system.
Then addsetuptools-cmd-depsin thesetup_requiresoption of yoursetuptools.Define dependencysetuptools.setup(cmdclass={'generate_py':GenereatePy},cmd_deps={'build_py':['generate_py']},)Command dependency to be sharedIf you are developing asetuptoolsplugin,
and want the command definition to be used by other project and run before some command,
specify the dependency in thesetuptools.cmd_depssection in yourentry_points.Enable setuptools-cmd-deps for the targetAddsetuptools-cmd-depsin theinstall_requiresoption of yoursetuptools,
so that any project uses your package, will automatically usessetuptools-cmd-deps.Define dependencyGenerally speaking, you already havedistutils.commandsin yourentry_points.For example, you definedgernate_pycommand in theentry_pointsas follows,distutils.commands =
    generate_py = command:GeneratePyand want it always run beforebuild_py.
Simply addsetuptools.cmd_depsin theentry_pointsas follows,setuptools.cmd_deps =
    build_py_dep = build_py:generate_pyNote that the namebuild_py_depis not used here.
It is just for the TOML syntax.
For the same reason, if there are multiple dependencies for one command,
it should use dot.as delimiter,setuptools.cmd_deps =
    command_dep = command:cmd1.cmd2Bothcmd1andcmd2will be run beforecommand.Or you can have multiple rules,setuptools.cmd_deps =
    command_dep1 = command:cmd1
    command_dep2 = command:cmd2
Package: setuptools-cpp
Simplified packaging forpybind11-based C++ extensionsDocumentation:https://setuptools-cpp.davidmontague.xyzSource Code:https://github.com/dmontagu/setuptools-cppFeaturesPybind11Extension: For standard Pybind11 extensions from C++ source filesCMakeExtension: Useful for incorporating CMake-dependent libraries like CGALPoetry Compatibility: Easy to use withpoetry'scustom build systemBasic UsageYou can use theCMakeExtensionorPybind11Extensionclasses in yoursetup.pyas follows:fromsetuptoolsimportsetupfromsetuptools_cppimportCMakeExtension,ExtensionBuilder,Pybind11Extensionext_modules=[# A basic pybind11 extension in <project_root>/src/ext1:Pybind11Extension("my_pkg.ext1",["src/ext1/ext1.cpp"],include_dirs=["src/ext1/include"]),# An extension with a custom <project_root>/src/ext2/CMakeLists.txt:CMakeExtension(f"my_pkg.ext2",sourcedir="src/ext2")]setup(name="my_pkg",version="0.1.0",packages=["my_pkg"],# ... other setup kwargs ...ext_modules=ext_modules,cmdclass=dict(build_ext=ExtensionBuilder),zip_safe=False,)You can then use standard setuptools commands likepython setup.py install.See theUser Guidefor more details.RequirementsThis package is intended for use with Python 3.6+.Installationpipinstallsetuptools-cppLicenseThis project is licensed under the terms of the MIT license.
Package: setuptools-cuda
Setuptools plugin for CUDA extensionsThesetuptools-cudais asetuptoolsplugin for building CUDA enabled Python extension modules.How does it compare to other packages on the market?As far as the authors of this package know, other CUDA-oriented Python projects focus mostly on providing
higher-level abstractions over CUDA that can be accessed in Python. For instance, the well-knownPyCUDAprovidesGPUArrayandSourceModuleabstractions.However, when it comes to compiling extension modules that use CUDA, surprisingly there seems to be no good
solution that just works out of the box. Typically, people tend to integrate the CUDA code into their extension
modules either using some third-party build systems or by writing some ad-hoc hacks for setuptools (see e.g.thisStakOverflow question).Thesetuptools-cudatries to fill this niche. It allows one for defining extension modules containing.cucompilation units that will be compiled withnvcc. Such extensions can then be build using normalsetuptoolsbuild procedures.QuickstartUsingsetuptools-cudais easy and requires you to perform the following steps.Addsetuptools-cudato yourbuild-systemrequirements inpyproject.toml. For instance like this:[build-system]requires=["setuptools","wheel","cython","setuptools-cuda"]If you are not using isolated builds, you should installsetuptools-cudain
your environment usingpip.Declare your extension module by passing list ofCudaExtensionobjects tocuda_extensionskeyword to
thesetup()function call insetup.py. For instance, one of the examples in this repository has
the followingsetup.pyfile:fromsetuptoolsimportsetupfromsetuptools_cudaimportCudaExtensionsetup(cuda_extensions=[CudaExtension(name="thrust",sources=["thrustcu/thrustcu.pyx","thrustcu/thrustcu_impl.cu"],),],)IMPORTANTdefineCUDAHOMEenvironment variable. It should point to the CUDA installation location. E.g.exportCUDAHOME=/opt/nvidia/hpc_sdk/Linux_x86_64/23.1/cudaIf you won't define theCUDAHOMEevironmental variable,setuptools-cudawill do its best to guess it, but
our experience shows that it might fail miserably (and probably silently).Build your package as usual. Typically just runningpip installshould do.AcknowledgementsThis package was inspired bysetuptools-rustpackage.
Package: setuptools_cython
Allows compiling Cython extensions in setuptools
by putting setuptools_cython in your setup_requires.UsageUse setuptools, add setuptools_cython to your setup_requires.Some verbatim code is required to make Extension behave as expected.Usage examplesetup.py:#!/usr/bin/env python

from setuptools import setup
from distutils.extension import Extension

# setuptools DWIM monkey-patch madness
# http://mail.python.org/pipermail/distutils-sig/2007-September/thread.html#8204
import sys
if 'setuptools.extension' in sys.modules:
    m = sys.modules['setuptools.extension']
    m.Extension.__dict__ = m._Extension.__dict__

setup(
        name = "example",
        version = "0.1",
        description="setuptools_cython example",
        setup_requires=[
            'setuptools_cython',
            ],
        ext_modules=[
            Extension('example', ['example.pyx']),
            ],
        )
Package: setuptools-cythonize
Thesetuptools-cythonizeprovidesdistutilsclasses to compilePythonsource code intoCcode usingCython. The generated code is packaged into a platform dependent archive.Install$> pip install setuptools-cythonizeSetup configurationAdd thecmdclasskeyword to the setup:fromsetuptoolsimportsetupfromsetuptools_cythonizeimportget_cmdclasssetup(cmdclass=get_cmdclass(),name="my_package",version="2.0.5",description="My custom library",...)Notethe functionget_cmdclass()forcewheelas default format
(recommended format for binary distribution). This behavior can be
disabled by passing the parameterwheel_default=False.Some packages can be excluded from thecythonizationby setting theexclude_cythonizeoption. The module names matching is done using the functionfnmatch.fnmatchcase.fromsetuptoolsimportsetupfromsetuptools_cythonizeimportget_cmdclasssetup(cmdclass=get_cmdclass(),name="my_package",...options={'build_py':{'exclude_cythonize':['my_package.subpack*']}},...)Notesome Python modules starting with__are excluded from the cythonization.
This includes:the__init__.pyfiles which are mandatory to keep the Python
packages integritythe__main__.pyfile in order to exectute the package using
the commandpython-m...TheCython compiler optionscan also be customized before running thesetup:fromsetuptoolsimportsetupfromCython.CompilerimportOptionsOptions.docstrings=Falsesetup(...)To speedup files compilation, thecythonizationcan be performed in parallel by setting theparalleloption. The number of CPUs availbale can be retrived using themultiprocessingmodule. For instance:importmultiprocessingfromsetuptoolsimportsetupfromsetuptools_cythonizeimportget_cmdclasssetup(cmdclass=get_cmdclass(),name="my_package",...options={'build_ext':{'parallel':multiprocessing.cpu_count()}},...)PackagingGenerate your package by executing thesetup.pyfile, all Python modules (except
the ones defined inexclude_cythonize) will be compiled and packaged:$> python setup.py bdist --cythonizeA source package can still be generated by removing the--cythonizeoption:$> python setup.py bdist
Package: setuptools-declarative-requirements
DeclarativesetuptoolsConfig Requirements Files SupportThis projects adds the ability for projects using setuptools declarative configuration
to specify requirements using requirements files.⚠There's a reason why this isn't, at least yet, supported by default. Pleaseread why.Anyway, if you know what you're doing, then this library solves the missing feature
of defining requirements using requirements files.setup.cfgYoursetup.cfgshould include a section namedrequirements-files, like:[requirements-files]setup_requires=requirements/setup.txtinstall_requires=requirements/base.txttests_require=requirements/tests.txtextras_require=docs=requirements/docs.txtcli=requirements/cli.txt⚠ ATTENTIONThe requirements filesMUSTbe included in the wheel file aswell as the source tarballFor the example shown above, insetup.cfg, add something like:[options.data_files].=requirements/*.txtOr something like the folowing on yourMANIFEST.in:include requirements/*.txtOr, if you usesetuptools-scm, the requirements files
need to be committed to the SCM repo.pyproject.tomlYourpyproject.tomlshould also includesetuptools-declarative-requirements:[build-system]requires=["setuptools>=50.3.2","wheel","setuptools-declarative-requirements"]build-backend="setuptools.build_meta"setup.pySome projects still use asetup.pyshim, similar to:#!/usr/bin/env pythonimportsetuptoolsif__name__=="__main__":setuptools.setup()If this is your case, yoursetup.cfgneeds an extra bit of tweak. Make sure you havesetuptools-declarative-requirementsin yoursetup_requires:[options]setup_requires=setuptools>=50.3.2setuptools-declarative-requirementsDo Note That⚠ This project makes no attempt to validate your requirements files.The only thing it does is include every non empty line from your requirements files which does
not start with#,-ror--.
Package: setuptools-docker
setuptools-dockerA light-weight setuptools extension for building docker images from python
projects.Python wheels are the preferred packaging format for distributing python
libraries or applications. However, in cloud native computation services
get packaged and deployed as docker/oci images. This project aims at
making the packaging of python services for such environments as easy
and as repeatable as building a wheel. It takes heavy inspiration fromjib.Usagesetuptools-docker extends setuptools with one additional command:bdist_docker. It will typically be used like this:python -m setup bdist_dockerFor a reference of arguments seepython -m setup bdist_docker --helpConfiguration via filesetuptools-docker utilizes the configuration mechanisms of setuptools
itself, e.g.,setup.cfg.It adds a new section[bdist_docker], e.g.:[bdist_docker]extra_requires=gunicornuser_id=1100environment_vars=FIZZ=BUZZOptionsKeyTypeDescriptionDefaultimage_namestrimage name (optionally incl. registry)metadata nameimage_tagstrimage tagmetadata versionrequirements_filestrpip requirements file to install into imageextra_requireslistextras to install alongside wheelindex_urlstrpip index url to install dependencies from(pip default index)index_usernamestrusername for authentication to PIP indexindex_passwordstrpassword for authentication to PIP indexbase_imagestrbase image for final stagepython:3.8-slim-bullseyeextra_os_packageslistextra deb packages to install into final stagebuilder-extra-os-packageslistextra deb packages to install into builder stageuser_idintuser id for docker USER directiveentrypointlistentrypoint in exec formcommandlistcommand in exec forminit_scriptslistpath/to/extra/init/scripts to run (prior to provided entrypoint )pip_cache_dockerboolwhether to use docker cache for pip cache dirTrueenvironment_varslistenvironment variables to set via docker ENV directive