Ai
1 Star 0 Fork 0

test/patchman

加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
文件
克隆/下载
setup.py 2.11 KB
一键复制 编辑 原始数据 按行查看 历史
Marcus Furlong 提交于 2015-02-06 13:25 +08:00 . move south migrations for django 1.7
from setuptools import setup
import os
with open('VERSION.txt', 'r') as version_file:
version = version_file.readline().strip()
def fullsplit(path, result=None):
"""
Split a pathname into components (the opposite of os.path.join) in a
platform-neutral way.
"""
if result is None:
result = []
head, tail = os.path.split(path)
if head == '':
return [tail] + result
if head == path:
return result
return fullsplit(head, [tail] + result)
packages = []
for dirpath, dirnames, filenames in os.walk('patchman'):
# Ignore dirnames that start with '.'
for i, dirname in enumerate(dirnames):
if dirname.startswith('.'):
del dirnames[i]
if filenames:
packages.append('.'.join(fullsplit(dirpath)))
data_files = []
data_files.append(
('/etc/patchman', ['etc/patchman-apache.conf']),
)
for dirpath, dirnames, filenames in os.walk('etc'):
# Ignore dirnames that start with '.'
for i, dirname in enumerate(dirnames):
if dirname.startswith('.'):
del dirnames[i]
if filenames:
path = dirpath.replace('etc', '/etc/patchman')
data_files.append(
[path, [os.path.join(dirpath, f) for f in filenames]]
)
for dirpath, dirnames, filenames in os.walk('media'):
# Ignore dirnames that start with '.'
for i, dirname in enumerate(dirnames):
if dirname.startswith('.'):
del dirnames[i]
if filenames:
path = dirpath.replace('media', '/usr/share/patchman/media')
data_files.append(
[path, [os.path.join(dirpath, f) for f in filenames]]
)
setup(
name='patchman',
version=version,
url='https://www.github.com/furlongm/patchman/',
author='Marcus Furlong',
author_email='furlongm@gmail.com',
description='django based patch status monitoring tool for linux systems',
packages=packages,
data_files=data_files,
package_data={'': ['*.html'], },
scripts=['sbin/patchman',
'sbin/patchman-set-secret-key',
'sbin/patchman-manage',
'sbin/patchman-south-migrations', ],
)
Loading...
马建仓 AI 助手
尝试更多
代码解读
代码找茬
代码优化
Python
1
https://gitee.com/android_ios_test/patchman.git
git@gitee.com:android_ios_test/patchman.git
android_ios_test
patchman
patchman
master

搜索帮助