-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathtemplate_setup.py
More file actions
62 lines (59 loc) · 1.75 KB
/
template_setup.py
File metadata and controls
62 lines (59 loc) · 1.75 KB
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
def gen_setup():
meta_setup = r"""
import sys
import os
from setuptools import setup
from pathlib import Path
from purescripto.version import __version__
readme = ''
setup(
name='pspy-executable',
version=__version__,
keywords="", # keywords of your project that separated by comma ","
description="", # a concise introduction of your project
long_description=readme,
long_description_content_type="text/markdown",
license='mit',
python_requires='>=3.5.0',
url='https://github.com/purescript-python/installer',
author='thautawarm',
author_email='twshere@outlook.com',
packages=['pspy_executable'],
install_requires=[],
package_data={
'pspy_executable': [
each.name for each in Path('pspy_executable').iterdir()
if each.name.startswith('pspy')
]
},
entry_points={"console_scripts": [
"pspy-blueprint=pspy_executable:exe",
"pspy-blueprint-check=pspy_executable:check"
]},
platforms="any",
classifiers=[
"Programming Language :: Python :: 3.5",
"Programming Language :: Python :: 3.6",
"Programming Language :: Python :: 3.7",
"Programming Language :: Python :: 3.8",
"Programming Language :: Python :: 3.9",
"Programming Language :: Python :: Implementation :: CPython",
],
zip_safe=False,
)
"""
print(meta_setup)
def gen_init():
meta_init = r"""
def exe():
from pathlib import Path
from subprocess import call
import os
import sys
exe_file = os.name == "nt" and "pspy-blueprint.exe" or "pspy-blueprint"
cmd = str((Path(__file__).parent / exe_file).absolute())
call([cmd, *sys.argv[1:]])
def check():
print("pspy-executable installed")
"""
print(meta_init)