本文整理汇总了Python中common_py.system.filesystem.FileSystem.dirname方法的典型用法代码示例。如果您正苦于以下问题:Python FileSystem.dirname方法的具体用法?Python FileSystem.dirname怎么用?Python FileSystem.dirname使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类common_py.system.filesystem.FileSystem
的用法示例。
在下文中一共展示了FileSystem.dirname方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Python代码示例。
示例1: get_repo_url
# 需要导入模块: from common_py.system.filesystem import FileSystem [as 别名]
# 或者: from common_py.system.filesystem.FileSystem import dirname [as 别名]
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
import sys
import subprocess
import getpass
from common_py.system.filesystem import FileSystem as fs
from common_py.system.executor import Executor as ex
SCRIPT_PATH = fs.dirname(fs.abspath(__file__))
BUILD_SCRIPT_DEBUG = fs.join(SCRIPT_PATH,
'build.py --clean --config=.build.default.config --buildtype=debug')
BUILD_SCRIPT_RELEASE = fs.join(SCRIPT_PATH,
'build.py --clean --config=.build.default.config --buildtype=release')
GIT_REPO_FORMAT = 'https://github.com/%s/iotjs.git'
def get_repo_url(fork_name):
return GIT_REPO_FORMAT % fork_name
def get_merge_branch_name(fork_name, branch_name):
示例2:
# 需要导入模块: from common_py.system.filesystem import FileSystem [as 别名]
# 或者: from common_py.system.filesystem.FileSystem import dirname [as 别名]
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
""" common path for scripts """
from common_py.system.filesystem import FileSystem as fs
# Root directory for the project.
PROJECT_ROOT = fs.abspath(fs.join(fs.dirname(__file__), fs.pardir, fs.pardir))
# Source code directory.
SRC_ROOT = fs.join(PROJECT_ROOT, 'src')
# Root Build directory.
BUILD_ROOT = fs.join(PROJECT_ROOT, 'build')
# Root Build directory.
TOOLS_ROOT = fs.join(PROJECT_ROOT, 'tools')
# Root directory for dependencies.
DEPS_ROOT = fs.join(PROJECT_ROOT, 'deps')
# Root directory for test.
TEST_ROOT = fs.join(PROJECT_ROOT, 'test')