-
Notifications
You must be signed in to change notification settings - Fork 1
/
setup.py
79 lines (71 loc) · 2.47 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
77
78
79
import os
import sys
import platform
import subprocess
from setuptools import setup, find_packages
if platform.system() == 'Windows':
if sys.maxsize > 2**32:
subprocess.call(
['easy_install', "http://www.voidspace.org.uk/downloads/pycrypto26/pycrypto-2.6.1.win-amd64-py2.7.exe"]
)
elif sys.maxsize < 2**32:
subprocess.call(
['easy_install', "http://www.voidspace.org.uk/downloads/pycrypto26/pycrypto-2.6.win32-py2.7.exe"]
)
# foldercreation
instfolder = os.path.join(os.path.expanduser("~"), '3color-Press')
sitefolder = os.path.join(instfolder, 'sites')
defaultfolder = os.path.join(sitefolder, 'default')
folders = ['content', 'images', 'themes']
imgfolders = ['comics', 'gallery', 'misc']
contfolders = ['book', 'news', 'single', 'gallery']
# TODO: add checks for themes, content,
# check to see the project folder ~/3color-Press exists
# if it doesn't, create project folder and subfolders
if os.path.exists(instfolder) is False:
os.mkdir(instfolder)
os.mkdir(sitefolder)
os.mkdir(defaultfolder)
for folder in folders:
os.mkdir(os.path.join(defaultfolder, folder))
for folder in contfolders:
os.mkdir(os.path.join(defaultfolder, 'content', folder))
for folder in imgfolders:
os.mkdir(os.path.join(defaultfolder, 'images', folder))
with open('README.txt') as file:
long_description = file.read()
# FIXME: the example file folder isn't copied over on install
setup(
name='3color-Press',
version='0.2.3',
author='Martin Knobel',
author_email='[email protected]',
license='BSD',
url='3color.noties.org',
description='A Flask based static site generator for comics',
long_description=long_description,
packages=find_packages(),
include_package_data=True,
install_requires=[
'Click',
'Flask > 0.8',
'Flask-FlatPages',
'Frozen-Flask',
'Fabric'
],
entry_points={
'console_scripts': ['3color=threecolor.cli:cli'],
'gui_scripts': ['3color-gui=threecolor.gui.gui']
},
classifiers=[
'Environment :: Console',
'Environment :: Web Environment',
'Framework :: Flask',
'License :: OSI Approved :: BSD License',
'Intended Audience :: End Users/Desktop',
'Development Status :: 3 - Alpha',
'Natural Language :: English',
'Programming Language :: Python :: 2.7',
'Topic :: Internet :: WWW/HTTP :: Site Management',
]
)