netarch

Network Archaeology library for Python
git clone https://git.woozle.org/neale/netarch.git

Neale Pickett  ·  2021-07-02

setup.py

  1#! /usr/bin/python3
  2
  3"""A setuptools based setup module.
  4See:
  5https://packaging.python.org/guides/distributing-packages-using-setuptools/
  6https://github.com/pypa/sampleproject
  7"""
  8
  9# Always prefer setuptools over distutils
 10from setuptools import setup, find_packages
 11import pathlib
 12
 13here = pathlib.Path(__file__).parent.resolve()
 14
 15# Get the long description from the README file
 16long_description = (here / 'README.md').read_text(encoding='utf-8')
 17
 18# Arguments marked as "Required" below must be included for upload to PyPI.
 19# Fields marked as "Optional" may be commented out.
 20
 21setup(
 22    # This is the name of your project. The first time you publish this
 23    # package, this name will be registered for you. It will determine how
 24    # users can install this project, e.g.:
 25    #
 26    # $ pip install sampleproject
 27    #
 28    # And where it will live on PyPI: https://pypi.org/project/sampleproject/
 29    #
 30    # There are some restrictions on what makes a valid project name
 31    # specification here:
 32    # https://packaging.python.org/specifications/core-metadata/#name
 33    name='netarch',  # Required
 34
 35    # Versions should comply with PEP 440:
 36    # https://www.python.org/dev/peps/pep-0440/
 37    #
 38    # For a discussion on single-sourcing the version across setup.py and the
 39    # project code, see
 40    # https://packaging.python.org/en/latest/single_source_version.html
 41    version='2.1.0',  # Required
 42
 43    # This is a one-line description or tagline of what your project does. This
 44    # corresponds to the "Summary" metadata field:
 45    # https://packaging.python.org/specifications/core-metadata/#summary
 46    description='Network Archaeology toolkit',  # Optional
 47
 48    # This is an optional longer description of your project that represents
 49    # the body of text which users will see when they visit PyPI.
 50    #
 51    # Often, this is the same as your README, so you can just read it in from
 52    # that file directly (as we have already done above)
 53    #
 54    # This field corresponds to the "Description" metadata field:
 55    # https://packaging.python.org/specifications/core-metadata/#description-optional
 56    long_description=long_description,  # Optional
 57
 58    # Denotes that our long_description is in Markdown; valid values are
 59    # text/plain, text/x-rst, and text/markdown
 60    #
 61    # Optional if long_description is written in reStructuredText (rst) but
 62    # required for plain-text or Markdown; if unspecified, "applications should
 63    # attempt to render [the long_description] as text/x-rst; charset=UTF-8 and
 64    # fall back to text/plain if it is not valid rst" (see link below)
 65    #
 66    # This field corresponds to the "Description-Content-Type" metadata field:
 67    # https://packaging.python.org/specifications/core-metadata/#description-content-type-optional
 68    long_description_content_type='text/markdown',  # Optional (see note above)
 69
 70    # This should be a valid link to your project's main homepage.
 71    #
 72    # This field corresponds to the "Home-Page" metadata field:
 73    # https://packaging.python.org/specifications/core-metadata/#home-page-optional
 74    url='https://github.com/dirtbags/netarch',  # Optional
 75
 76    # This should be your name or the name of the organization which owns the
 77    # project.
 78    author='Neale Pickett',  # Optional
 79
 80    # This should be a valid email address corresponding to the author listed
 81    # above.
 82    author_email='neale@woozle.org',  # Optional
 83
 84    # Classifiers help users find your project by categorizing it.
 85    #
 86    # For a list of valid classifiers, see https://pypi.org/classifiers/
 87    classifiers=[  # Optional
 88        # How mature is this project? Common values are
 89        #   3 - Alpha
 90        #   4 - Beta
 91        #   5 - Production/Stable
 92        'Development Status :: 5 - Production/Stable',
 93
 94        # Indicate who your project is intended for
 95        'Intended Audience :: Developers',
 96        #'Topic :: Software Development :: Build Tools',
 97
 98        # Pick your license as you wish
 99        'License :: Public Domain',
100
101        # Specify the Python versions you support here. In particular, ensure
102        # that you indicate you support Python 3. These classifiers are *not*
103        # checked by 'pip install'. See instead 'python_requires' below.
104        #'Programming Language :: Python :: 3',
105        #'Programming Language :: Python :: 3.6',
106        #'Programming Language :: Python :: 3.7',
107        #'Programming Language :: Python :: 3.8',
108        #'Programming Language :: Python :: 3.9',
109        'Programming Language :: Python :: 3 :: Only',
110    ],
111
112    # This field adds keywords for your project which will appear on the
113    # project page. What does your project relate to?
114    #
115    # Note that this is a list of additional keywords, separated
116    # by commas, to be used to assist searching for the distribution in a
117    # larger catalog.
118    keywords='network, packet, tcp, protocol, development',  # Optional
119
120    # When your source code is in a subdirectory under the project root, e.g.
121    # `src/`, it is necessary to specify the `package_dir` argument.
122    #package_dir={'': 'src'},  # Optional
123
124    # You can just specify package directories manually here if your project is
125    # simple. Or you can use find_packages().
126    #
127    # Alternatively, if you just want to distribute a single Python file, use
128    # the `py_modules` argument instead as follows, which will expect a file
129    # called `my_module.py` to exist:
130    #
131    #   py_modules=["my_module"],
132    #
133    #packages=find_packages(where='src'),  # Required
134    packages=["netarch"],
135
136    # Specify which Python versions you support. In contrast to the
137    # 'Programming Language' classifiers above, 'pip install' will check this
138    # and refuse to install the project if the version does not match. See
139    # https://packaging.python.org/guides/distributing-packages-using-setuptools/#python-requires
140    python_requires='>=3.6, <4',
141
142    # This field lists other packages that your project depends on to run.
143    # Any package you put here will be installed by pip when your project is
144    # installed, so they must be valid existing projects.
145    #
146    # For an analysis of "install_requires" vs pip's requirements files see:
147    # https://packaging.python.org/en/latest/requirements.html
148    #install_requires=['peppercorn'],  # Optional
149
150    # List additional groups of dependencies here (e.g. development
151    # dependencies). Users will be able to install these using the "extras"
152    # syntax, for example:
153    #
154    #   $ pip install sampleproject[dev]
155    #
156    # Similar to `install_requires` above, these must be valid existing
157    # projects.
158    extras_require={  # Optional
159        #'dev': ['check-manifest'],
160        #'test': ['coverage'],
161    },
162
163    # If there are data files included in your packages that need to be
164    # installed, specify them here.
165    package_data={  # Optional
166        #'sample': ['package_data.dat'],
167    },
168
169    # Although 'package_data' is the preferred approach, in some case you may
170    # need to place data files outside of your packages. See:
171    # http://docs.python.org/distutils/setupscript.html#installing-additional-files
172    #
173    # In this case, 'data_file' will be installed into '<sys.prefix>/my_data'
174    #data_files=[('my_data', ['data/data_file'])],  # Optional
175
176    # To provide executable scripts, use entry points in preference to the
177    # "scripts" keyword. Entry points provide cross-platform support and allow
178    # `pip` to create the appropriate form of executable for the target
179    # platform.
180    #
181    # For example, the following would provide a command called `sample` which
182    # executes the function `main` from this package when invoked:
183    #entry_points={  # Optional
184        #'console_scripts': [
185            #'sample=sample:main',
186        #],
187    #},
188
189    # List additional URLs that are relevant to your project as a dict.
190    #
191    # This field corresponds to the "Project-URL" metadata fields:
192    # https://packaging.python.org/specifications/core-metadata/#project-url-multiple-use
193    #
194    # Examples listed include a pattern for specifying where the package tracks
195    # issues, where the source is hosted, where to say thanks to the package
196    # maintainers, and where to support the project financially. The key is
197    # what's used to render the link text on PyPI.
198    project_urls={  # Optional
199        'Bug Reports': 'https://github.com/dirtbags/netarch/issues',
200        'Source': 'https://github.com/dirtbags/netarch/',
201    },
202)