-
Notifications
You must be signed in to change notification settings - Fork 7
/
Copy pathsetup.py
58 lines (49 loc) · 1.67 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
import io
import os
from setuptools import setup
from setuptools.command.install import install
PTH_FILE = 'python_ls.pth'
with io.open('README.md', encoding='UTF-8') as fp:
long_description = fp.read()
class install_with_pth(install):
@property
def target(self):
return os.path.join(self.install_lib, PTH_FILE)
def get_outputs(self):
outputs = install.get_outputs(self) or []
return outputs + [self.target]
def run(self):
ret = install.run(self)
with open(PTH_FILE) as ifp:
with open(self.target, 'w') as ofp:
ofp.write(ifp.read())
return ret
setup(
name='python-ls',
use_scm_version={'write_to': 'python_ls/_version.py'},
setup_requires=['setuptools_scm'],
packages=['python_ls'],
data_files=[("", ["LICENSE"])],
author='Gabriel Reis',
author_email='[email protected]',
description='A better replacement for Python dir() builtin function',
long_description=long_description,
long_description_content_type='text/markdown',
license='MIT',
keywords='python dir ls search attributes',
url='http://github.com/gabrielcnr/python-ls',
classifiers=[
'Development Status :: 5 - Production/Stable',
'Intended Audience :: Developers',
'License :: OSI Approved :: MIT License',
'Operating System :: OS Independent',
'Programming Language :: Python :: 2.7',
'Programming Language :: Python :: 3.4',
'Programming Language :: Python :: 3.5',
'Programming Language :: Python :: 3.6',
'Programming Language :: Python :: 3.7',
],
cmdclass={
'install': install_with_pth,
}
)