File: setup.py

package info (click to toggle)
python-django-x509 0.9-1
  • links: PTS, VCS
  • area: main
  • in suites: bullseye
  • size: 484 kB
  • sloc: python: 2,233; javascript: 46; makefile: 6
file content (69 lines) | stat: -rw-r--r-- 2,197 bytes parent folder | download
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
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
#!/usr/bin/env python
import os
import sys

from setuptools import find_packages, setup

from django_x509 import get_version


def get_install_requires():
    """
    parse requirements.txt, ignore links, exclude comments
    """
    requirements = []
    for line in open('requirements.txt').readlines():
        # skip to next iteration if comment or empty line
        if (
            line.startswith('#')
            or line == ''
            or line.startswith('http')
            or line.startswith('git')
        ):
            continue
        # add line to requirements
        requirements.append(line)
    return requirements


if sys.argv[-1] == 'publish':
    # delete any *.pyc, *.pyo and __pycache__
    os.system('find . | grep -E "(__pycache__|\.pyc|\.pyo$)" | xargs rm -rf')
    os.system('python setup.py sdist bdist_wheel')
    os.system('twine upload -s dist/*')
    os.system('rm -rf dist build')
    args = {'version': get_version()}
    print('You probably want to also tag the version now:')
    print("  git tag -a %(version)s -m 'version %(version)s'" % args)
    print('  git push --tags')
    sys.exit()


setup(
    name='django-x509',
    version=get_version(),
    license='BSD',
    author='Federico Capoano',
    author_email='f.capoano@cineca.it',
    description='Reusable django app to generate and manage x509 certificates',
    long_description=open('README.rst').read(),
    url='https://github.com/openwisp/django-x509',
    download_url='https://github.com/openwisp/django-x509/releases',
    platforms=['Platform Indipendent'],
    keywords=['django', 'x509', 'pki', 'PEM', 'openwisp'],
    packages=find_packages(exclude=['tests', 'docs']),
    include_package_data=True,
    zip_safe=False,
    install_requires=get_install_requires(),
    classifiers=[
        'Development Status :: 3 - Alpha',
        'Environment :: Web Environment',
        'Topic :: Internet :: WWW/HTTP',
        'Intended Audience :: Developers',
        'License :: OSI Approved :: BSD License',
        'Operating System :: OS Independent',
        'Framework :: Django',
        'Topic :: Security :: Cryptography',
        'Programming Language :: Python :: 3',
    ],
)