def get_datafiles(): source_dirs = ['examples', 'tests'] datafiles = [] for s in source_dirs: for d, _, files in os.walk(s): datafiles.append((d, [os.path.join(d, f) for f in files])) return datafiles
def package_files(directory): paths = [] for (path, directories, filenames) in os.walk(directory): for filename in filenames: paths.append((directory + path.split(directory)[1], [os.path.join(path, filename)])) return paths
from setuptools import setup, os packages, data_files = [], [] root_dir = os.path.dirname(__file__) if root_dir: os.chdir(root_dir) for dirpath, dirnames, filenames in os.walk('registration_email_only'): # Ignore dirnames that start with '.' for i, dirname in enumerate(dirnames): if dirname.startswith('.'): del dirnames[i] if '__init__.py' in filenames: pkg = dirpath.replace(os.path.sep, '.') if os.path.altsep: pkg = pkg.replace(os.path.altsep, '.') packages.append(pkg) elif filenames: prefix = dirpath[24:] # Strip "registration_email_only/" or "registration_email_only\" for f in filenames: data_files.append(os.path.join(prefix, f)) setup( name='django-registration-email-only', version='0.1.2', author='Gabriel Grant', author_email='*****@*****.**', packages=packages, package_data={'registration_email_only': data_files}, license='LGPL',
#!/usr/bin/env python3 import sys from setuptools import setup, find_packages, os # Place the directory containing _version_git on the path for path, _, filenames in os.walk(os.path.dirname(os.path.abspath(__file__))): if "_version_git.py" in filenames: sys.path.append(path) break from _version_git import __version__, get_cmdclass # noqa module_name = "gphotos-sync" install_reqs = [ "attrs", "exif", "appdirs", "requests_oauthlib", "pyyaml>=4.2b1", "psutil", ] develop_reqs = [ "pytest>=5.0.1", "mock", "coverage", "pytest", "flake8", "black",