|
4 | 4 | from distutils.core import setup |
5 | 5 |
|
6 | 6 | import sys |
7 | | -import json |
8 | | -import os |
| 7 | + |
| 8 | +from ACedIt.install_entry import InstallEntry |
9 | 9 |
|
10 | 10 | with open('requirements.txt', 'r') as f: |
11 | 11 | requirements = [line.strip() for line in f.readlines()] |
|
14 | 14 | if sys.version_info >= (3,): |
15 | 15 | extra['use_2to3'] = True |
16 | 16 |
|
17 | | -default_site = 'codeforces' |
18 | | -workdir = os.path.join(os.path.expanduser('~'), 'ACedIt') |
19 | | -cache_dir = os.path.join(os.path.expanduser('~'), '.cache', 'ACedIt') |
20 | | - |
21 | | -from ACedIt.main import supported_sites |
22 | | - |
23 | | -for site in supported_sites: |
24 | | - # create cache directory and working directory structure |
25 | | - if not os.path.isdir(os.path.join(cache_dir, site)): |
26 | | - os.makedirs(os.path.join(cache_dir, site)) |
27 | | - if not os.path.isdir(os.path.join(workdir, site)): |
28 | | - os.makedirs(os.path.join(workdir, site)) |
29 | | - |
30 | | -data = {'default_site': default_site.strip(), 'workdir': os.path.expanduser('~'), |
31 | | - 'cachedir': cache_dir} |
32 | | -with open(os.path.join(cache_dir, 'constants.json'), 'w') as f: |
33 | | - f.write(json.dumps(data, indent=2)) |
34 | | - |
35 | 17 | setup( |
36 | 18 | name='ACedIt', |
37 | 19 |
|
|
57 | 39 |
|
58 | 40 | keywords=['sample test cases', 'downloader', 'competitive programming'], |
59 | 41 |
|
| 42 | + cmdclass={ |
| 43 | + 'install': InstallEntry, |
| 44 | + 'develop': InstallEntry, |
| 45 | + }, |
| 46 | + |
60 | 47 | classifiers=[ |
61 | 48 | 'Operating System :: POSIX :: Linux', |
62 | 49 | 'License :: OSI Approved :: MIT License', |
|
0 commit comments