Permalink
Browse files

dinamically generate MANIFEST.in

  • Loading branch information...
giampaolo committed Nov 18, 2017
1 parent 341e9ce commit 56ec86b65156448f7fc9ff08dcb8291cb0d2c34e
Showing with 94 additions and 17 deletions.
  1. +55 −17 MANIFEST.in
  2. +3 −0 Makefile
  3. +1 −0 pyftpdlib/ioloop.py
  4. +35 −0 scripts/generate_manifest.py
@@ -1,21 +1,59 @@
# Tells "python setup.py sdist" what files to include in the tarball.
include *.bat
include *.rst
include .coveragerc
include CREDITS*
include HISTORY*
include LICENSE*
include Makefile
include .git-pre-commit
include .gitignore
include CREDITS
include HISTORY.rst
include LICENSE
include MANIFEST.in
include Makefile
include README.rst
include demo/anti_flood_ftpd.py
include demo/basic_ftpd.py
include demo/keycert.pem
include demo/md5_ftpd.py
include demo/multi_proc_ftp.py
include demo/multi_thread_ftp.py
include demo/throttled_ftpd.py
include demo/tls_ftpd.py
include demo/unix_daemon.py
include demo/unix_ftpd.py
include demo/winnt_ftpd.py
include docs/Makefile
include docs/README
include docs/adoptions.rst
include docs/api.rst
include docs/benchmarks.rst
include docs/conf.py
include docs/faqs.rst
include docs/images/freebsd.gif
include docs/index.rst
include docs/install.rst
include docs/make.bat
include docs/rfc-compliance.rst
include docs/tutorial.rst
include make.bat
include pyftpdlib/__init__.py
include pyftpdlib/__main__.py
include pyftpdlib/_compat.py
include pyftpdlib/authorizers.py
include pyftpdlib/filesystems.py
include pyftpdlib/handlers.py
include pyftpdlib/ioloop.py
include pyftpdlib/log.py
include pyftpdlib/servers.py
include pyftpdlib/test/README
include pyftpdlib/test/__init__.py
include pyftpdlib/test/keycert.pem
include pyftpdlib/test/runner.py
include pyftpdlib/test/test_authorizers.py
include pyftpdlib/test/test_filesystems.py
include pyftpdlib/test/test_functional.py
include pyftpdlib/test/test_functional_ssl.py
include pyftpdlib/test/test_ioloop.py
include pyftpdlib/test/test_misc.py
include pyftpdlib/test/test_servers.py
include scripts/ftpbench
include scripts/generate_manifest.py
include scripts/print_announce.py
include setup.py
include tox.ini
recursive-exclude .ci *
recursive-exclude build *
recursive-exclude docs/_build *
recursive-include demo *.py *.pem README*
recursive-include docs *.rst *.conf *.css *.js *.html *.py *.bat *Makefile* *README
recursive-include pyftpdlib *.py *.pem *.rst README*
recursive-include README*
recursive-include scripts *
@@ -170,6 +170,9 @@ release: ## Creates a release (tar.gz + upload + git tag release).
$(PYTHON) -m twine upload dist/* # upload tar on PYPI
${MAKE} git-tag-release
generate-manifest: ## Generates MANIFEST.in file.
$(PYTHON) scripts/generate_manifest.py > MANIFEST.in
print-announce: ## Print announce of new release.
@$(PYTHON) scripts/print_announce.py
@@ -750,6 +750,7 @@ def poll(self,
else: # select() - POSIX and Windows
IOLoop = Select
IOLoop = Select
# ===================================================================
# --- asyncore dispatchers
@@ -0,0 +1,35 @@
#!/usr/bin/env python
# Copyright (c) 2009 Giampaolo Rodola'. All rights reserved.
# Use of this source code is governed by a BSD-style license that can be
# found in the LICENSE file.
"""
Generate MANIFEST.in file.
"""
import os
import subprocess
IGNORED_EXTS = ('.png', '.jpg', '.jpeg')
IGNORED_FILES = ('.travis.yml', 'appveyor.yml')
def sh(cmd):
return subprocess.check_output(
cmd, shell=True, universal_newlines=True).strip()
def main():
files = sh("git ls-files").split('\n')
for file in files:
if file.startswith('.ci/') or \
os.path.splitext(file)[1].lower() in IGNORED_EXTS or \
file in IGNORED_FILES:
continue
print("include " + file)
if __name__ == '__main__':
main()

0 comments on commit 56ec86b

Please sign in to comment.