File: setup.py

package info (click to toggle)
python-dnslib 0.9.25-1
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid, trixie
  • size: 680 kB
  • sloc: python: 3,522; sh: 31; makefile: 7
file content (53 lines) | stat: -rw-r--r-- 1,530 bytes parent folder | download | duplicates (2)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
#!/usr/bin/env python

# To update PyPi version:
#
# (Make sure you have updated version and changelog in __init__.py)
#
# ./run_tests.sh
# python3 setup.py readme
# git commit -am ...
# git push 
# git tag -a <version> -m <message>
# git push --tags
# (Create release from tag on Github)
#
# rm -rf dist
# python3 setup.py sdist
# python3 setup.py bdist_wheel 
# python2 setup.py bdist_wheel 
# twine upload

try:
    from setuptools import Command, setup
except ImportError:
    from distutils.core import Command, setup

import dnslib
long_description = dnslib.__doc__.rstrip() + "\n"
version = dnslib.version

class GenerateReadme(Command):
    description = "Generates README file from long_description"
    user_options = []
    def initialize_options(self): pass
    def finalize_options(self): pass
    def run(self):
        open("README","w").write(long_description)

setup(name='dnslib',
      version = version,
      description = 'Simple library to encode/decode DNS wire-format packets',
      long_description = long_description,
      long_description_content_type="text/markdown",
      author = 'PaulC',
      url = 'https://github.com/paulc/dnslib',
      cmdclass = {'readme' : GenerateReadme},
      packages = ['dnslib'],
      package_dir = {'dnslib' : 'dnslib'},
      license = 'BSD',
      classifiers = [ "Topic :: Internet :: Name Service (DNS)",
                      "Programming Language :: Python :: 2",
                      "Programming Language :: Python :: 3",
                      ],
     )