-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathpackage.py
executable file
·63 lines (48 loc) · 1.65 KB
/
package.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
59
60
61
62
63
# -*- coding: utf-8 -*-
name = "pycharm_ce"
# Vendor packages: <vendor_version>+local.<our_version>
__version__ = "2020.1"
version = __version__ + "+local.1.0.0"
description = "The Python IDE for Professional Developers"
authors = ["JetBrains", "Joseph Yu"]
variants = [["platform-linux", "arch-x86_64"]]
tools = ["pycharm"]
# @late()
# def tools():
# import os
# bin_path = os.path.join(str(this.root), 'bin')
# executables = []
# for item in os.listdir(bin_path):
# path = os.path.join(bin_path, item)
# if os.access(path, os.X_OK) and not os.path.isdir(path):
# executables.append(item)
# return executables
build_command = r"""
set -euf -o pipefail
# Setup: curl "{CURL_FLAGS}" ...
# Show progress bar if output to terminal, else silence
declare -a CURL_FLAGS
CURL_FLAGS=("-L")
[ -t 1 ] && CURL_FLAGS+=("-#") || CURL_FLAGS+=("-sS")
URL="https://download.jetbrains.com/python/pycharm-community-{version}.tar.gz"
if [[ $REZ_BUILD_INSTALL -eq 1 ]]
then
set -x
curl "{CURL_FLAGS}" "$URL" \
| tar --strip-components=1 -xz -C "$REZ_BUILD_INSTALL_PATH"
# Setup our own executables that we can call from PATH
mkdir -p "$REZ_BUILD_INSTALL_PATH"/local/bin
ln -srf \
"$REZ_BUILD_INSTALL_PATH"/bin/pycharm.sh \
"$REZ_BUILD_INSTALL_PATH"/local/bin/pycharm
fi
""".format(
version=__version__, CURL_FLAGS="${{CURL_FLAGS[@]}}"
)
def commands():
"""Commands to set up environment for ``rez env pycharm_ce``"""
import os
env.PATH.append(os.path.join("{root}", "local", "bin"))
env.PYTHONPATH.append(
os.path.join("{root}", "plugins", "python-ce", "helpers", "pydev")
)