Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commit4adc34e

Browse files
committed
Merge branch 'release/0.7.5b'
2 parentsedb5b3b +eb4071a commit4adc34e

File tree

11 files changed

+335
-131
lines changed

11 files changed

+335
-131
lines changed

‎.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,7 @@
99
Gemfile.lock
1010
VimFlavor.lock
1111
_
12+
build
1213
tags
1314
test.py
1415
todo.txt

‎Changelog.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
Changelog
22
=========
33

4-
## 2013-12-02 0.7.4b
4+
## 2013-12-02 0.7.5b
55
--------------------
66
* Update indentation support;
77
* Python3 support;

‎Makefile

Lines changed: 37 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,9 @@ PYLAMA = $(LIBS)/pylama
44

55
.PHONY: clean
66
clean:
7-
find. -name"*.pyc" -delete
7+
find$(CURDIR) -name"*.pyc" -delete
8+
rm -rf$(CURDIR)/build
9+
rm -rf*.deb
810

911
# Temporary disable rope tests on Travis
1012
.PHONY: travis
@@ -29,3 +31,37 @@ $(PYLAMA):
2931

3032
$(PYLAMA)/lint/pylama_pylint:
3133
cp -r~/Dropbox/projects/pylama/plugins/pylama_pylint/pylama_pylint/$(PYLAMA)/lint/pylama_pylint
34+
35+
$(CURDIR)/build:
36+
mkdir -p$(CURDIR)/build/usr/share/vim/addons
37+
mkdir -p$(CURDIR)/build/usr/share/vim/registry
38+
cp -r after autoload doc ftplugin plugin pymode syntax$(CURDIR)/build/usr/share/vim/addons/.
39+
cp -r python-mode.yaml$(CURDIR)/build/usr/share/vim/registry/.
40+
41+
TARGET?=$(CURDIR)/deb
42+
PACKAGE_VERSION?=$(shell git describe --tags `git rev-list master --tags --max-count=1`)
43+
PACKAGE_NAME="vim-python-mode"
44+
PACKAGE_MAINTAINER="Kirill Klenov <horneds@gmail.com>"
45+
PACKAGE_URL=http://github.com/klen/python-mode
46+
deb: clean$(CURDIR)/build
47+
@git co gh-pages
48+
@fpm -s dir -t deb -a all\
49+
-n$(PACKAGE_NAME)\
50+
-v$(PACKAGE_VERSION)\
51+
-m$(PACKAGE_MAINTAINER)\
52+
--url$(PACKAGE_URL)\
53+
--license"GNU lesser general public license"\
54+
--description"Vim-Swissknife for python"\
55+
--deb-user root\
56+
--deb-group root\
57+
-C$(CURDIR)/build\
58+
-d"python2.7"\
59+
-d"vim-addon-manager"\
60+
usr
61+
@mkdir -p$(TARGET)
62+
@prm --type deb --path$(TARGET)\
63+
--release precise,quantal,raring,saucy\
64+
--arch amd64,i386,all\
65+
--component main\
66+
--directory$(CURDIR)\
67+
--gpg horneds@gmail.com

‎README.rst

Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -95,6 +95,28 @@ Then rebuild **helptags** in vim::
9595
must be enabled to use python-mode.
9696

9797

98+
Debian packages
99+
---------------
100+
101+
Repository URL: http://klen.github.io/python-mode/deb/
102+
Install with commands:
103+
104+
::
105+
106+
add-apt-repository http://klen.github.io/python-mode/deb main
107+
apt-get update
108+
apt-get install vim-python-mode
109+
110+
If you are getting the message: "The following signatures couldn' be verified because the public key is not available": ::
111+
112+
apt-key adv --keyserver keyserver.ubuntu.com --recv-keys B5DF65307000E266
113+
114+
`vim-python-mode` using `vim-addons`, so after installation just enable
115+
`python-mode` with command: ::
116+
117+
vim-addons install python-mode
118+
119+
98120
Troubleshooting
99121
===============
100122

‎doc/pymode.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66
(__) (__) (__) (_) (_)(_____)(_)\_) (_/\/\_)(_____)(____/(____)~
77

88

9-
Version: 0.7.4b
9+
Version: 0.7.5b
1010

1111
==============================================================================
1212
CONTENTS*pymode-contents*

‎plugin/pymode.vim

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
" vi:fdl=1
2-
letg:pymode_version="0.7.4b"
2+
letg:pymode_version="0.7.5b"
33

44
com! PymodeVersionechomsg"Current python-mode version:" .g:pymode_version
55
com! PymodeTroubleshootingcallpymode#troubleshooting#test()

‎pylama.ini

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
[main]
2+
ignore = R0201,R0922,C0111,E1103

‎pylint.ini

Lines changed: 0 additions & 25 deletions
This file was deleted.

‎pymode/run.py

Lines changed: 2 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,7 @@ def run_code():
3333
# A false code will be treated as a
3434
# successful run, and the error will be hidden from Vim
3535
env.error("Script exited with code %s"%e.code)
36-
env.stop()
36+
returnenv.stop()
3737

3838
exceptException:
3939
importtraceback
@@ -43,13 +43,9 @@ def run_code():
4343
err=sys.stderr.getvalue()
4444

4545
output=sys.stdout.getvalue().strip()
46+
output=env.prepare_value(output)
4647
sys.stdout,sys.stderr=stdout_,stderr_
4748

48-
try:
49-
output=output.decode('utf-8').encode(env.options.get('encoding'))
50-
exceptAttributeError:
51-
pass
52-
5349
errors+= [erforerinerr.splitlines()iferand"<string>"notiner]
5450

5551
env.let('l:traceback',errors[2:])

‎pymode/utils.py

Lines changed: 0 additions & 96 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,4 @@
11
""" Pymode utils. """
2-
importjson
32
importos.path
43
importsys
54
importthreading
@@ -18,92 +17,6 @@
1817
PY2=sys.version_info[0]==2
1918

2019

21-
defpymode_message(content):
22-
""" Show message. """
23-
24-
vim.command('call pymode#wide_message("%s")'%str(content))
25-
26-
27-
defpymode_confirm(yes=True,msg='Do the changes:'):
28-
""" Confirmation.
29-
30-
:return bool:
31-
32-
"""
33-
default='yes'ifyeselse'no'
34-
action=pymode_input(msg,default)
35-
returnactionand'yes'.startswith(action)
36-
37-
38-
defpymode_inputlist(msg,opts):
39-
""" Get user choice.
40-
41-
:return str: A choosen option
42-
43-
"""
44-
choices= ['[Pymode] %s'%msg]
45-
choices+= ["%s. %s"% (num,opt)fornum,optinenumerate(opts,1)]
46-
try:
47-
input_str=int(vim.eval('inputlist(%s)'%json.dumps(choices)))
48-
except (KeyboardInterrupt,ValueError):
49-
input_str=0
50-
51-
ifnotinput_str:
52-
pymode_message('Cancelled!')
53-
returnFalse
54-
55-
try:
56-
returnopts[input_str-1]
57-
except (IndexError,ValueError):
58-
pymode_error('Invalid option: %s'%input_str)
59-
returnpymode_inputlist(msg,opts)
60-
61-
62-
defpymode_input(umsg,udefault='',opts=None):
63-
""" Get user input.
64-
65-
:return str: A user input
66-
67-
"""
68-
msg='[Pymode] %s '%umsg
69-
default=udefault
70-
71-
ifdefault!='':
72-
msg+='[%s] '%default
73-
74-
try:
75-
vim.command('echohl Debug')
76-
input_str=vim.eval('input("%s> ")'%msg)
77-
vim.command('echohl none')
78-
exceptKeyboardInterrupt:
79-
input_str=''
80-
81-
returninput_strordefault
82-
83-
84-
defpymode_error(content):
85-
""" Show error. """
86-
87-
vim.command('call pymode#error("%s")'%str(content))
88-
89-
90-
defcatch_and_print_exceptions(func):
91-
""" Catch any exception.
92-
93-
:return func:
94-
95-
"""
96-
defwrapper(*args,**kwargs):
97-
try:
98-
returnfunc(*args,**kwargs)
99-
except (Exception,vim.error)ase:# noqa
100-
ifDEBUG:
101-
raise
102-
pymode_error(e)
103-
returnNone
104-
returnwrapper
105-
106-
10720
@contextmanager
10821
defsilence_stderr():
10922
""" Redirect stderr. """
@@ -127,12 +40,3 @@ def patch_paths():
12740
sys.path.insert(0,os.path.join(os.path.dirname(__file__),'libs2'))
12841
else:
12942
sys.path.insert(0,os.path.join(os.path.dirname(__file__),'libs3'))
130-
131-
132-
debug=lambda_:None
133-
134-
ifDEBUG:
135-
defdebug(msg):# noqa
136-
""" Debug message. """
137-
138-
print(msg)

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp