source: setup.py @ 1723:7d731aea5360

Last change on this file since 1723:7d731aea5360 was 1723:7d731aea5360, checked in by Stefan Schwarzer <sschwarzer@…>, 6 months ago
Remove positional argument specifiers for `format` In strings for `format` calls, remove the digits for positional arguments. For example, "{0}, {1}" becomes "{}, {}".
  • Property exe set to *
File size: 2.5 KB
Line 
1#! /usr/bin/env python
2# Copyright (C) 2003-2018, Stefan Schwarzer <sschwarzer@sschwarzer.net>
3# See the file LICENSE for licensing terms.
4
5"""
6setup.py - installation script for Python distutils
7"""
8
9import os
10import sys
11
12from distutils import core
13
14
15_name = "ftputil"
16_package = "ftputil"
17_version = open("VERSION").read().strip()
18
19
20doc_files = [os.path.join("doc", name)
21             for name in ["ftputil.txt", "ftputil.html",
22                          "whats_new_in_ftputil_3.0.txt",
23                          "whats_new_in_ftputil_3.0.html",
24                          "README.txt"]]
25
26doc_files_are_present = all((os.path.exists(doc_file)
27                            for doc_file in doc_files))
28
29if "install" in sys.argv[1:] and not doc_files_are_present:
30    print("One or more of the HTML documentation files are missing.")
31    print("Please generate them with `make docs`.")
32    sys.exit(1)
33
34core.setup(
35  # Installation data
36  name=_name,
37  version=_version,
38  packages=[_package],
39  package_dir={_package: _package},
40  data_files=[("doc/ftputil", doc_files)],
41  # Metadata
42  author="Stefan Schwarzer",
43  author_email="sschwarzer@sschwarzer.net",
44  url="http://ftputil.sschwarzer.net/",
45  description="High-level FTP client library (virtual file system and more)",
46  keywords="FTP, client, library, virtual file system",
47  license="Open source (revised BSD license)",
48  platforms=["Pure Python"],
49  long_description="""\
50ftputil is a high-level FTP client library for the Python programming
51language. ftputil implements a virtual file system for accessing FTP servers,
52that is, it can generate file-like objects for remote files. The library
53supports many functions similar to those in the os, os.path and
54shutil modules. ftputil has convenience functions for conditional uploads
55and downloads, and handles FTP clients and servers in different timezones.""",
56  download_url=
57    "http://ftputil.sschwarzer.net/trac/attachment/wiki/Download/"
58    "{}-{}.tar.gz?format=raw".format(_name, _version),
59  classifiers=[
60    "Development Status :: 5 - Production/Stable",
61    "Environment :: Other Environment",
62    "Intended Audience :: Developers",
63    "Intended Audience :: System Administrators",
64    "License :: OSI Approved :: BSD License",
65    "Operating System :: OS Independent",
66    "Programming Language :: Python",
67    "Programming Language :: Python :: 2",
68    "Programming Language :: Python :: 3",
69    "Topic :: Internet :: File Transfer Protocol (FTP)",
70    "Topic :: Software Development :: Libraries :: Python Modules",
71    "Topic :: System :: Filesystems",
72    ]
73  )
74
Note: See TracBrowser for help on using the repository browser.