-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathsetup.py
76 lines (59 loc) · 1.9 KB
/
setup.py
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
70
71
72
73
74
75
76
#! /usr/bin/python
# -*- coding: utf-8 -*-
#from ez_setup import use_setuptools
#use_setuptools()
import sys
import os
from setuptools import setup
from setuptools.command.test import test as TestCommand
import versioneer
LONG='''
MGD stand for ManGa Downloader.
It's command line tool for downloading manga from various site.
Actually foes nothing really serious.
More information on: https://github.com/Djabx/mgd
'''
requirements = []
with open('requirements.txt') as req:
requirements = req.readlines()
test_requirements = []
with open('requirements_test.txt') as treq:
test_requirements = treq.readlines()
versioneer.VCS = 'git'
versioneer.versionfile_source = 'mgdpck/_version.py'
versioneer.versionfile_build = 'mgdpck/_version.py'
versioneer.tag_prefix = 'v' # tags are like v1.2.0
versioneer.parentdir_prefix = 'mgd' # dirname like 'mgd-v1.2.0'
class PyTest(TestCommand):
def finalize_options(self):
TestCommand.finalize_options(self)
self.test_args = ['test']
self.test_suite = True
def run_tests(self):
#import here, cause outside the eggs aren't loaded
import pytest
errno = pytest.main(self.test_args)
sys.exit(errno)
cmdclass_arg = versioneer.get_cmdclass()
cmdclass_arg.update({'test': PyTest})
setup(name='mgd',
description='Module for downloading manga.',
long_description=LONG,
author='Alexandre Badez',
author_email='[email protected]',
install_requires=requirements,
license='Apache',
url='https://github.com/Djabx/mgd',
version=versioneer.get_version(),
scripts = [
'mgd.py'
],
packages=[
'mgdpck',
'mgdpck.readers',
'mgdpck.writters'
],
tests_require=test_requirements,
cmdclass=cmdclass_arg,
classifiers=['Development Status :: 1 - Alpha',
'Programming Language :: Python :: 3.5'])