| 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 |
setup.py - installation script for Python distutils |
|---|
| 38 |
""" |
|---|
| 39 |
|
|---|
| 40 |
import os |
|---|
| 41 |
import sys |
|---|
| 42 |
|
|---|
| 43 |
from distutils import core |
|---|
| 44 |
from distutils import sysconfig |
|---|
| 45 |
from distutils.command import install_lib as install_lib_module |
|---|
| 46 |
|
|---|
| 47 |
|
|---|
| 48 |
_name = "ftputil" |
|---|
| 49 |
_package = "ftputil" |
|---|
| 50 |
_version = open("VERSION").read().strip() |
|---|
| 51 |
_data_target = "%s/%s" % (sysconfig.get_python_lib(), _package) |
|---|
| 52 |
|
|---|
| 53 |
|
|---|
| 54 |
|
|---|
| 55 |
|
|---|
| 56 |
class FtputilInstallLib(install_lib_module.install_lib): |
|---|
| 57 |
def byte_compile(self, files): |
|---|
| 58 |
if sys.version_info < (2, 5): |
|---|
| 59 |
files = [f for f in files |
|---|
| 60 |
if os.path.basename(f) != "_test_with_statement.py"] |
|---|
| 61 |
|
|---|
| 62 |
return install_lib_module.install_lib.byte_compile(self, files) |
|---|
| 63 |
|
|---|
| 64 |
|
|---|
| 65 |
core.setup( |
|---|
| 66 |
|
|---|
| 67 |
name=_name, |
|---|
| 68 |
version=_version, |
|---|
| 69 |
packages=[_package], |
|---|
| 70 |
package_dir={_package: ""}, |
|---|
| 71 |
data_files=[(_data_target, ["ftputil.txt", "ftputil.html", |
|---|
| 72 |
"README.txt", "README.html"])], |
|---|
| 73 |
cmdclass={'install_lib': FtputilInstallLib}, |
|---|
| 74 |
|
|---|
| 75 |
|
|---|
| 76 |
author="Stefan Schwarzer", |
|---|
| 77 |
author_email="sschwarzer@sschwarzer.net", |
|---|
| 78 |
url="http://ftputil.sschwarzer.net/", |
|---|
| 79 |
description="High-level FTP client library (virtual filesystem and more)", |
|---|
| 80 |
keywords="FTP, client, virtual file system", |
|---|
| 81 |
license="Open source (revised BSD license)", |
|---|
| 82 |
platforms=["Pure Python (Python version >= 2.3)"], |
|---|
| 83 |
long_description="""\ |
|---|
| 84 |
ftputil is a high-level FTP client library for the Python programming |
|---|
| 85 |
language. ftputil implements a virtual file system for accessing FTP servers, |
|---|
| 86 |
that is, it can generate file-like objects for remote files. The library |
|---|
| 87 |
supports many functions similar to those in the os, os.path and |
|---|
| 88 |
shutil modules. ftputil has convenience functions for conditional uploads |
|---|
| 89 |
and downloads, and handles FTP clients and servers in different timezones.""", |
|---|
| 90 |
download_url= |
|---|
| 91 |
"http://ftputil.sschwarzer.net/trac/attachment/wiki/Download/%s-%s.tar.gz?format=raw" % |
|---|
| 92 |
(_name, _version), |
|---|
| 93 |
classifiers=[ |
|---|
| 94 |
"Development Status :: 6 - Mature", |
|---|
| 95 |
"Environment :: Other Environment", |
|---|
| 96 |
"Intended Audience :: Developers", |
|---|
| 97 |
"License :: OSI Approved :: BSD License", |
|---|
| 98 |
"Operating System :: OS Independent", |
|---|
| 99 |
"Programming Language :: Python", |
|---|
| 100 |
"Topic :: Internet :: File Transfer Protocol (FTP)", |
|---|
| 101 |
"Topic :: Software Development :: Libraries :: Python Modules", |
|---|
| 102 |
"Topic :: System :: Filesystems", |
|---|
| 103 |
] |
|---|
| 104 |
) |
|---|
| 105 |
|
|---|