Updated to 2019.2
This commit is contained in:
parent
d7aef519f0
commit
f82b905c72
8
.SRCINFO
8
.SRCINFO
@ -1,6 +1,6 @@
|
|||||||
pkgbase = pycharm-professional
|
pkgbase = pycharm-professional
|
||||||
pkgdesc = Powerful Python and Django IDE. Professional Edition.
|
pkgdesc = Powerful Python and Django IDE. Professional Edition.
|
||||||
pkgver = 2019.1.3
|
pkgver = 2019.2.0
|
||||||
pkgrel = 1
|
pkgrel = 1
|
||||||
url = https://www.jetbrains.com/pycharm/
|
url = https://www.jetbrains.com/pycharm/
|
||||||
arch = x86_64
|
arch = x86_64
|
||||||
@ -38,16 +38,16 @@ pkgbase = pycharm-professional
|
|||||||
backup = opt/pycharm-professional/bin/pycharm.vmoptions
|
backup = opt/pycharm-professional/bin/pycharm.vmoptions
|
||||||
backup = opt/pycharm-professional/bin/pycharm64.vmoptions
|
backup = opt/pycharm-professional/bin/pycharm64.vmoptions
|
||||||
backup = opt/pycharm-professional/bin/idea.properties
|
backup = opt/pycharm-professional/bin/idea.properties
|
||||||
source = https://download.jetbrains.com/python/pycharm-professional-2019.1.3.tar.gz
|
source = https://download.jetbrains.com/python/pycharm-professional-2019.2.tar.gz
|
||||||
source = pycharm-professional.desktop
|
source = pycharm-professional.desktop
|
||||||
source = pycharm
|
source = pycharm
|
||||||
source = charm.desktop
|
source = charm.desktop
|
||||||
source = charm
|
source = charm
|
||||||
sha256sums = 8322de8b816895fcb7fd854e83d25084b0593ea2b90b5b4598a495ef2e958824
|
sha256sums = 1940fce9f162b8a804672379345d6b4ec343d2ec65b3d3054bd088e8b1fdfbb4
|
||||||
sha256sums = aaf7113e8c56e4d977eca204d57350d9493eda2710abefd2488a2b5d47c53344
|
sha256sums = aaf7113e8c56e4d977eca204d57350d9493eda2710abefd2488a2b5d47c53344
|
||||||
sha256sums = 818ed42f4200ae13315587abf6f247f93e68c658a94794f73924c985cdc145d0
|
sha256sums = 818ed42f4200ae13315587abf6f247f93e68c658a94794f73924c985cdc145d0
|
||||||
sha256sums = 21e77b6b18e14636f9827e1f8d45bbc8dba8fb14ea5f4cde285c1ef4bb01c85e
|
sha256sums = 21e77b6b18e14636f9827e1f8d45bbc8dba8fb14ea5f4cde285c1ef4bb01c85e
|
||||||
sha256sums = 029490b735ec0f5785a083f65172f6eece3fa64dad94b8b56f0db73c5418cfa2
|
sha256sums = bd2faa933e409a7de53750c701020a301617f5220091f1a760a6d9f61d1c6556
|
||||||
|
|
||||||
pkgname = pycharm-professional
|
pkgname = pycharm-professional
|
||||||
|
|
||||||
|
8
PKGBUILD
8
PKGBUILD
@ -1,8 +1,8 @@
|
|||||||
# Maintainer: XavierCLL <xavier.corredor.llano (a) gmail.com>
|
# Maintainer: XavierCLL <xavier.corredor.llano (a) gmail.com>
|
||||||
|
|
||||||
pkgname=pycharm-professional
|
pkgname=pycharm-professional
|
||||||
pkgver=2019.1.3
|
pkgver=2019.2.0
|
||||||
_pkgver=2019.1.3
|
_pkgver=2019.2
|
||||||
pkgrel=1
|
pkgrel=1
|
||||||
pkgdesc="Powerful Python and Django IDE. Professional Edition."
|
pkgdesc="Powerful Python and Django IDE. Professional Edition."
|
||||||
arch=('x86_64')
|
arch=('x86_64')
|
||||||
@ -22,11 +22,11 @@ source=("https://download.jetbrains.com/python/$pkgname-$_pkgver.tar.gz"
|
|||||||
"charm.desktop"
|
"charm.desktop"
|
||||||
"charm")
|
"charm")
|
||||||
# https://download.jetbrains.com/python/pycharm-professional-${_pkgver}.tar.gz.sha256
|
# https://download.jetbrains.com/python/pycharm-professional-${_pkgver}.tar.gz.sha256
|
||||||
sha256sums=('8322de8b816895fcb7fd854e83d25084b0593ea2b90b5b4598a495ef2e958824'
|
sha256sums=('1940fce9f162b8a804672379345d6b4ec343d2ec65b3d3054bd088e8b1fdfbb4'
|
||||||
'aaf7113e8c56e4d977eca204d57350d9493eda2710abefd2488a2b5d47c53344'
|
'aaf7113e8c56e4d977eca204d57350d9493eda2710abefd2488a2b5d47c53344'
|
||||||
'818ed42f4200ae13315587abf6f247f93e68c658a94794f73924c985cdc145d0'
|
'818ed42f4200ae13315587abf6f247f93e68c658a94794f73924c985cdc145d0'
|
||||||
'21e77b6b18e14636f9827e1f8d45bbc8dba8fb14ea5f4cde285c1ef4bb01c85e'
|
'21e77b6b18e14636f9827e1f8d45bbc8dba8fb14ea5f4cde285c1ef4bb01c85e'
|
||||||
'029490b735ec0f5785a083f65172f6eece3fa64dad94b8b56f0db73c5418cfa2')
|
'bd2faa933e409a7de53750c701020a301617f5220091f1a760a6d9f61d1c6556')
|
||||||
makedepends=('python2-setuptools' 'python-setuptools')
|
makedepends=('python2-setuptools' 'python-setuptools')
|
||||||
optdepends=('ipython2: For enhanced interactive Python shell v2 inside Pycharm'
|
optdepends=('ipython2: For enhanced interactive Python shell v2 inside Pycharm'
|
||||||
'ipython: For enhanced interactive Python shell v3 inside Pycharm'
|
'ipython: For enhanced interactive Python shell v3 inside Pycharm'
|
||||||
|
71
charm
Normal file → Executable file
71
charm
Normal file → Executable file
@ -1,28 +1,53 @@
|
|||||||
#!/usr/bin/env python
|
#!/usr/bin/env python
|
||||||
# -*- coding: utf-8 -*-
|
# -*- coding: utf-8 -*-
|
||||||
|
|
||||||
|
import os
|
||||||
import socket
|
import socket
|
||||||
import struct
|
import struct
|
||||||
import sys
|
import sys
|
||||||
import os
|
|
||||||
import time
|
|
||||||
|
|
||||||
# see com.intellij.idea.SocketLock for the server side of this interface
|
# see com.intellij.idea.SocketLock for the server side of this interface
|
||||||
|
|
||||||
RUN_PATH = u'/opt/pycharm-professional/bin/pycharm.sh'
|
RUN_PATH = u'/opt/pycharm-professional/bin/pycharm.sh'
|
||||||
CONFIG_PATH = u'~/.PyCharm2019.1/config'
|
CONFIG_PATH = u'~/.PyCharm2019.2/config'
|
||||||
SYSTEM_PATH = u'~/.PyCharm2019.1/system'
|
SYSTEM_PATH = u'~/.PyCharm2019.2/system'
|
||||||
|
|
||||||
|
|
||||||
def print_usage(cmd):
|
def print_usage(cmd):
|
||||||
print(('Usage:\n' +
|
print(('Usage:\n' +
|
||||||
' {0} -h | -? | --help\n' +
|
' {0} -h | -? | --help\n' +
|
||||||
' {0} [project_dir]\n' +
|
' {0} [project_dir] [-w|--wait]\n' +
|
||||||
' {0} [-l|--line line] [project_dir|--temp-project] file[:line]\n' +
|
' {0} [-l|--line line] [project_dir|--temp-project] [-w|--wait] file[:line]\n' +
|
||||||
' {0} diff <left> <right>\n' +
|
' {0} diff <left> <right>\n' +
|
||||||
' {0} merge <local> <remote> [base] <merged>').format(cmd))
|
' {0} merge <local> <remote> [base] <merged>').format(cmd))
|
||||||
|
|
||||||
|
|
||||||
|
def write_to_sock(sock, str):
|
||||||
|
if sys.version_info[0] >= 3: str = str.encode('utf-8')
|
||||||
|
sock.send(struct.pack('>h', len(str)) + str)
|
||||||
|
|
||||||
|
|
||||||
|
def read_from_sock(sock):
|
||||||
|
len = struct.unpack('>h', sock.recv(2))[0]
|
||||||
|
return sock.recv(len).decode('utf-8')
|
||||||
|
|
||||||
|
|
||||||
|
def read_sequence_from_sock(sock):
|
||||||
|
result = []
|
||||||
|
while True:
|
||||||
|
try:
|
||||||
|
str = read_from_sock(sock)
|
||||||
|
if str == '---':
|
||||||
|
break
|
||||||
|
result.append(str)
|
||||||
|
|
||||||
|
except (socket.error, IOError) as e:
|
||||||
|
print("I/O error({0}): {1} ({2})".format(e.errno, e.strerror, e))
|
||||||
|
traceback.print_exception(*sys.exc_info())
|
||||||
|
return result
|
||||||
|
return result
|
||||||
|
|
||||||
|
|
||||||
def process_args(argv):
|
def process_args(argv):
|
||||||
args = []
|
args = []
|
||||||
|
|
||||||
@ -36,6 +61,8 @@ def process_args(argv):
|
|||||||
elif arg == '-l' or arg == '--line':
|
elif arg == '-l' or arg == '--line':
|
||||||
args.append(arg)
|
args.append(arg)
|
||||||
skip_next = True
|
skip_next = True
|
||||||
|
elif arg == '-w' or arg == '--wait':
|
||||||
|
args.append('--wait')
|
||||||
elif skip_next:
|
elif skip_next:
|
||||||
args.append(arg)
|
args.append(arg)
|
||||||
skip_next = False
|
skip_next = False
|
||||||
@ -67,30 +94,28 @@ def try_activate_instance(args):
|
|||||||
return False
|
return False
|
||||||
|
|
||||||
s = socket.socket()
|
s = socket.socket()
|
||||||
s.settimeout(0.3)
|
s.settimeout(1.0)
|
||||||
try:
|
try:
|
||||||
s.connect(('127.0.0.1', port))
|
s.connect(('127.0.0.1', port))
|
||||||
except (socket.error, IOError):
|
except (socket.error, IOError):
|
||||||
return False
|
return False
|
||||||
|
|
||||||
found = False
|
paths = read_sequence_from_sock(s)
|
||||||
while True:
|
found = CONFIG_PATH in paths
|
||||||
try:
|
|
||||||
path_len = struct.unpack('>h', s.recv(2))[0]
|
|
||||||
path = s.recv(path_len).decode('utf-8')
|
|
||||||
if os.path.abspath(path) == os.path.abspath(CONFIG_PATH):
|
|
||||||
found = True
|
|
||||||
break
|
|
||||||
except (socket.error, IOError):
|
|
||||||
return False
|
|
||||||
|
|
||||||
if found:
|
if found:
|
||||||
cmd = 'activate ' + token + '\0' + os.getcwd() + '\0' + '\0'.join(args)
|
write_to_sock(s, 'activate ' + token + '\0' + os.getcwd() + '\0' + '\0'.join(args))
|
||||||
if sys.version_info[0] >= 3: cmd = cmd.encode('utf-8')
|
|
||||||
encoded = struct.pack('>h', len(cmd)) + cmd
|
s.settimeout(None)
|
||||||
s.send(encoded)
|
response = read_sequence_from_sock(s)
|
||||||
time.sleep(0.5) # don't close the socket immediately
|
if response[0] != 'ok':
|
||||||
return True
|
print('bad response: ' + response)
|
||||||
|
exit(1)
|
||||||
|
|
||||||
|
if len(response) > 2:
|
||||||
|
print(response[2])
|
||||||
|
|
||||||
|
exit(int(response[1]))
|
||||||
|
|
||||||
return False
|
return False
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user