source: setup.py

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