source: setup.py

Last change on this file was 1981:424aea01122a, checked in by Stefan Schwarzer <sschwarzer@…>, 12 months ago
Set development status to `Stable`
  • Property exe set to *
File size: 2.7 KB
Line 
1#! /usr/bin/env python
2# Copyright (C) 2003-2020, 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 = [
21    os.path.join("doc", name)
22    for name in [
23        "ftputil.txt",
24        "ftputil.html",
25        "whats_new_in_ftputil_3.0.txt",
26        "whats_new_in_ftputil_3.0.html",
27        "README.txt",
28    ]
29]
30
31doc_files_are_present = all((os.path.exists(doc_file) for doc_file in doc_files))
32
33if "install" in sys.argv[1:] and not doc_files_are_present:
34    print("One or more of the HTML documentation files are missing.")
35    print("Please generate them with `make docs`.")
36    sys.exit(1)
37
38core.setup(
39    # Installation data
40    name=_name,
41    version=_version,
42    packages=[_package],
43    package_dir={_package: _package},
44    data_files=[("doc/ftputil", doc_files)],
45    # Metadata
46    author="Stefan Schwarzer",
47    author_email="sschwarzer@sschwarzer.net",
48    url="https://ftputil.sschwarzer.net/",
49    description="High-level FTP client library (virtual file system and more)",
50    keywords="FTP, client, library, virtual file system",
51    license="Open source (revised BSD license)",
52    platforms=["Pure Python"],
53    # See https://packaging.python.org/guides/distributing-packages-using-setuptools/#python-requires
54    python_requires=">=3.6",
55    long_description="""\
56ftputil is a high-level FTP client library for the Python programming
57language. ftputil implements a virtual file system for accessing FTP servers,
58that is, it can generate file-like objects for remote files. The library
59supports many functions similar to those in the os, os.path and
60shutil modules. ftputil has convenience functions for conditional uploads
61and downloads, and handles FTP clients and servers in different timezones.""",
62    download_url="http://ftputil.sschwarzer.net/trac/attachment/wiki/Download/"
63    "{}-{}.tar.gz?format=raw".format(_name, _version),
64    classifiers=[
65        # Commented-out for beta release
66        "Development Status :: 5 - Production/Stable",
67        #"Development Status :: 4 - Beta",
68        "Environment :: Other Environment",
69        "Intended Audience :: Developers",
70        "Intended Audience :: System Administrators",
71        "License :: OSI Approved :: BSD License",
72        "Operating System :: OS Independent",
73        "Programming Language :: Python",
74        "Programming Language :: Python :: 3 :: Only",
75        "Topic :: Internet :: File Transfer Protocol (FTP)",
76        "Topic :: Software Development :: Libraries :: Python Modules",
77        "Topic :: System :: Filesystems",
78    ],
79)
Note: See TracBrowser for help on using the repository browser.