[BACK]Return to setuptools.py CVS log [TXT][DIR] Up to [cvs.NetBSD.org] / pkgsrc / pkgtools / url2pkg / files

File: [cvs.NetBSD.org] / pkgsrc / pkgtools / url2pkg / files / setuptools.py (download)

Revision 1.2, Wed Sep 11 05:25:55 2019 UTC (4 weeks, 6 days ago) by rillig
Branch: MAIN
CVS Tags: pkgsrc-2019Q3-base, pkgsrc-2019Q3
Changes since 1.1: +9 -9 lines

pkgtools/url2pkg: update to 2.34

Changes since 2.33:

* code cleanup in MakeMaker.pm
* don't create a PLIST for Perl packages

* allow Python dependencies from setup.py to use spaces around >=
* properly indented Python code according to PEP 8
* added mock for setuptools.find_package
* only try to migrate a package from GitHub to PyPI if it is really
  a Python package on GitHub

# $NetBSD: setuptools.py,v 1.2 2019/09/11 05:25:55 rillig Exp $

def url2pkg_print_depends(keyword, depends):
    for dep in depends:
        print('%s\t%s%s' % (keyword, dep.replace(' ', ''), '' if '>' in dep else '>=0'))

def setup(**kwargs):
    if 'install_requires' in kwargs:
        url2pkg_print_depends('DEPENDS', kwargs['install_requires'])

    if 'tests_require' in kwargs:
        url2pkg_print_depends('TEST_DEPENDS', kwargs['tests_require'])

def find_packages(where='.', exclude=(), include=('*',)):
    return []