Skip to content

Commit 59418c9

Browse files
author
Russell Stewart
committed
Moved pycompletion.sh to data directory.
1 parent 701b606 commit 59418c9

4 files changed

Lines changed: 3 additions & 31 deletions

File tree

pythonpy/data/__init__.py

Whitespace-only changes.

setup.py

Lines changed: 3 additions & 31 deletions
Original file line numberDiff line numberDiff line change
@@ -1,35 +1,6 @@
11
#!/usr/bin/env python
22
from setuptools import setup
3-
import os
43
import sys
5-
import tempfile
6-
7-
for path in os.environ['PATH'].split(':'):
8-
target = os.path.join(os.path.dirname(path), 'etc', 'bash_completion.d')
9-
if os.path.isdir(target):
10-
break
11-
else:
12-
# Fall back to the default used by many Linux distros
13-
target = '/etc/bash_completion.d'
14-
15-
try:
16-
with tempfile.TemporaryFile(dir=target) as t:
17-
pass
18-
except OSError as e:
19-
print(
20-
'''******************************************************************************
21-
Pythonpy was not able to install bash completion because it does not have write
22-
access to /etc/bash_completion.d.
23-
If you would still like to install bash completion, either:
24-
1) Reinstall with `sudo pip install pythonpy`
25-
2) Configure tab completion manually:
26-
source /path/to/virtualenv/bash_completion.d/pycompletion.sh
27-
28-
Installation proceeding without root access...
29-
******************************************************************************''')
30-
target='bash_completion.d'
31-
32-
data_files = [(target, ['pythonpy/pycompletion.sh']),]
334

345
py_entry = 'py%s = pythonpy.__main__:main'
356
pycompleter_entry = 'pycompleter%s = pythonpy.pycompleter:main'
@@ -43,11 +14,12 @@
4314
name='pythonpy',
4415
version='0.4.4',
4516
description='python -c, with tab completion and shorthand',
46-
data_files=data_files,
17+
#data_files=data_files,
4718
license='MIT',
4819
url='https://github.com/Russell91/pythonpy',
4920
long_description='https://github.com/Russell91/pythonpy',
50-
packages = ['pythonpy'],
21+
packages=['pythonpy'],
22+
package_data={'pythonpy': ['data/pycompletion.sh']},
5123
entry_points = {
5224
'console_scripts': entry_points_scripts
5325
},

0 commit comments

Comments
 (0)