diff options
9 files changed, 114 insertions, 114 deletions
diff --git a/pkgtools/url2pkg/files/python/distutils/__init__.py b/pkgtools/url2pkg/files/python/distutils/__init__.py index 0a3f1933fdf..ad2a7272fe9 100644 --- a/pkgtools/url2pkg/files/python/distutils/__init__.py +++ b/pkgtools/url2pkg/files/python/distutils/__init__.py @@ -1,9 +1,9 @@ -# $NetBSD: __init__.py,v 1.1 2022/07/16 08:59:39 rillig Exp $
-#
-# This is a drop-in replacement for the distutils Python module. Instead
-# of actually searching for the dependencies, it extracts the dependency
-# information and includes it in the generated pkgsrc package Makefile.
-#
-# https://docs.python.org/3/distutils/
-# As of Python 3.10, distutils is deprecated.
-# The successor is setuptools.
+# $NetBSD: __init__.py,v 1.2 2022/08/25 19:56:07 rillig Exp $ +# +# This is a drop-in replacement for the distutils Python module. Instead +# of actually searching for the dependencies, it extracts the dependency +# information and includes it in the generated pkgsrc package Makefile. +# +# https://docs.python.org/3/distutils/ +# As of Python 3.10, distutils is deprecated. +# The successor is setuptools. diff --git a/pkgtools/url2pkg/files/python/distutils/core.py b/pkgtools/url2pkg/files/python/distutils/core.py index e14b1138b28..a970b1d146b 100644 --- a/pkgtools/url2pkg/files/python/distutils/core.py +++ b/pkgtools/url2pkg/files/python/distutils/core.py @@ -1,18 +1,18 @@ -# $NetBSD: core.py,v 1.1 2022/07/16 08:59:39 rillig Exp $
-#
-# Fake implementation of distutils.core.
-#
-# https://docs.python.org/3/distutils/apiref.html#module-distutils.core
-
-import url2pkg
-
-
-# used by pkgsrc package devel/py-pysha3 1.0.2
-def setup(**kwargs):
- url2pkg.setup(**kwargs)
-
-
-# Originally from distutils.cmd.
-# used by pkgsrc package devel/py-pysha3 1.0.2
-class Command:
- pass
+# $NetBSD: core.py,v 1.2 2022/08/25 19:56:07 rillig Exp $ +# +# Fake implementation of distutils.core. +# +# https://docs.python.org/3/distutils/apiref.html#module-distutils.core + +import url2pkg + + +# used by pkgsrc package devel/py-pysha3 1.0.2 +def setup(**kwargs): + url2pkg.setup(**kwargs) + + +# Originally from distutils.cmd. +# used by pkgsrc package devel/py-pysha3 1.0.2 +class Command: + pass diff --git a/pkgtools/url2pkg/files/python/distutils/extension.py b/pkgtools/url2pkg/files/python/distutils/extension.py index 14418e2bfca..35db508f322 100644 --- a/pkgtools/url2pkg/files/python/distutils/extension.py +++ b/pkgtools/url2pkg/files/python/distutils/extension.py @@ -1,10 +1,10 @@ -# $NetBSD: extension.py,v 1.1 2022/07/16 08:59:39 rillig Exp $
-#
-# Fake implementation of distutils.extension
-#
-# https://docs.python.org/3/distutils/apiref.html#module-distutils.extension
-
-# used by pkgsrc package devel/py-pysha3 1.0.2
-class Extension:
- def __init__(self, *args, **kwargs):
- pass
+# $NetBSD: extension.py,v 1.2 2022/08/25 19:56:07 rillig Exp $ +# +# Fake implementation of distutils.extension +# +# https://docs.python.org/3/distutils/apiref.html#module-distutils.extension + +# used by pkgsrc package devel/py-pysha3 1.0.2 +class Extension: + def __init__(self, *args, **kwargs): + pass diff --git a/pkgtools/url2pkg/files/python/distutils/version.py b/pkgtools/url2pkg/files/python/distutils/version.py index 0ffe35a2fd6..b0691b293b3 100644 --- a/pkgtools/url2pkg/files/python/distutils/version.py +++ b/pkgtools/url2pkg/files/python/distutils/version.py @@ -1,9 +1,9 @@ -# $NetBSD: version.py,v 1.1 2022/07/16 08:59:39 rillig Exp $
-#
-# Fake implementation of distutils.version.
-#
-# https://docs.python.org/3/distutils/apiref.html#module-distutils.version
-
-# used by pkgsrc package wip/py-torch 1.12.0
-class LooseVersion:
- pass
+# $NetBSD: version.py,v 1.2 2022/08/25 19:56:07 rillig Exp $ +# +# Fake implementation of distutils.version. +# +# https://docs.python.org/3/distutils/apiref.html#module-distutils.version + +# used by pkgsrc package wip/py-torch 1.12.0 +class LooseVersion: + pass diff --git a/pkgtools/url2pkg/files/python/setuptools/command/build_ext.py b/pkgtools/url2pkg/files/python/setuptools/command/build_ext.py index d48c6f859f3..6556157e3a9 100644 --- a/pkgtools/url2pkg/files/python/setuptools/command/build_ext.py +++ b/pkgtools/url2pkg/files/python/setuptools/command/build_ext.py @@ -1,7 +1,7 @@ -# $NetBSD: build_ext.py,v 1.1 2022/07/16 08:59:39 rillig Exp $
-#
-# Fake implementation of setuptools.command.build_ext.
-#
-# https://github.com/pypa/setuptools/blob/main/setuptools/command/build_ext.py
-
-# used by pkgsrc package wip/pytorch 1.12.0
+# $NetBSD: build_ext.py,v 1.2 2022/08/25 19:56:07 rillig Exp $ +# +# Fake implementation of setuptools.command.build_ext. +# +# https://github.com/pypa/setuptools/blob/main/setuptools/command/build_ext.py + +# used by pkgsrc package wip/pytorch 1.12.0 diff --git a/pkgtools/url2pkg/files/python/setuptools/command/install.py b/pkgtools/url2pkg/files/python/setuptools/command/install.py index a4a7f18dd12..2511770d6fd 100644 --- a/pkgtools/url2pkg/files/python/setuptools/command/install.py +++ b/pkgtools/url2pkg/files/python/setuptools/command/install.py @@ -1,7 +1,7 @@ -# $NetBSD: install.py,v 1.1 2022/07/16 08:59:39 rillig Exp $
-#
-# Fake implementation of setuptools.command.install.
-#
-# https://github.com/pypa/setuptools/blob/main/setuptools/command/install.py
-
-# used by pkgsrc package wip/pytorch 1.12.0
+# $NetBSD: install.py,v 1.2 2022/08/25 19:56:07 rillig Exp $ +# +# Fake implementation of setuptools.command.install. +# +# https://github.com/pypa/setuptools/blob/main/setuptools/command/install.py + +# used by pkgsrc package wip/pytorch 1.12.0 diff --git a/pkgtools/url2pkg/files/python/setuptools/command/sdist.py b/pkgtools/url2pkg/files/python/setuptools/command/sdist.py index eeda10630e1..4351f41f165 100644 --- a/pkgtools/url2pkg/files/python/setuptools/command/sdist.py +++ b/pkgtools/url2pkg/files/python/setuptools/command/sdist.py @@ -1,7 +1,7 @@ -# $NetBSD: sdist.py,v 1.1 2022/07/16 08:59:39 rillig Exp $
-#
-# Fake implementation of setuptools.command.sdist.
-#
-# https://github.com/pypa/setuptools/blob/main/setuptools/command/sdist.py
-
-# used by pkgsrc package wip/pytorch 1.12.0
+# $NetBSD: sdist.py,v 1.2 2022/08/25 19:56:07 rillig Exp $ +# +# Fake implementation of setuptools.command.sdist. +# +# https://github.com/pypa/setuptools/blob/main/setuptools/command/sdist.py + +# used by pkgsrc package wip/pytorch 1.12.0 diff --git a/pkgtools/url2pkg/files/python/setuptools/dist.py b/pkgtools/url2pkg/files/python/setuptools/dist.py index ffcfed9fb13..3a3fdbbaebb 100644 --- a/pkgtools/url2pkg/files/python/setuptools/dist.py +++ b/pkgtools/url2pkg/files/python/setuptools/dist.py @@ -1,7 +1,7 @@ -# $NetBSD: dist.py,v 1.1 2022/07/16 08:59:39 rillig Exp $
-#
-# Fake implementation for setuptools.dist.
-
-# used by pkgsrc package wip/py-torch 1.12.0
-class Distribution:
- pass
+# $NetBSD: dist.py,v 1.2 2022/08/25 19:56:07 rillig Exp $ +# +# Fake implementation for setuptools.dist. + +# used by pkgsrc package wip/py-torch 1.12.0 +class Distribution: + pass diff --git a/pkgtools/url2pkg/files/python/url2pkg.py b/pkgtools/url2pkg/files/python/url2pkg.py index 3f3ede6e9a2..5b1798e23b2 100644 --- a/pkgtools/url2pkg/files/python/url2pkg.py +++ b/pkgtools/url2pkg/files/python/url2pkg.py @@ -1,40 +1,40 @@ -# $NetBSD: url2pkg.py,v 1.1 2022/07/16 08:59:38 rillig Exp $
-#
-# Forwards the module metadata from distutils and setuptools to url2pkg.
-
-def print_depends(varname, depends):
- for dep in depends:
- print('%s\t%s%s' % (varname, dep.replace(' ', ''), '' if '>' in dep else '>=0'))
-
-
-def print_var(varname, value):
- if value != '':
- print('var\t%s\t%s' % (varname, value))
-
-
-def print_cmd(cmd, arg):
- print('\t'.join(('cmd', cmd, arg)))
-
-
-def print_license(license_name):
- if license_name == '':
- return
- print_cmd('license', license_name)
- print_cmd(
- 'license_default',
- '%s # TODO: from setup.py; needs to be adjusted' % license_name)
-
-
-def setup(**kwargs):
- print_depends('DEPENDS', kwargs.get('requires', [])) # only for distutils.core
- print_depends('DEPENDS', kwargs.get('install_requires', []))
- print_depends('TEST_DEPENDS', kwargs.get('tests_require', []))
- print_depends('BUILD_DEPENDS', kwargs.get('extras_require', {}).get('dev', []))
- print_depends('BUILD_DEPENDS', kwargs.get('setup_requires', []))
- print_var('COMMENT', kwargs.get('description', '').rstrip('.'))
- print_var('HOMEPAGE', kwargs.get('url', ''))
- print_license(kwargs.get('license', ''))
-
- # TODO: implement 'python_requires'
- # example pkgsrc package: devel/py-futures
- # example values: >=2.6, <3, >=2.7, !=3.0.*, !=3.1.*, !=3.2.*, !=3.3.*
+# $NetBSD: url2pkg.py,v 1.2 2022/08/25 19:56:07 rillig Exp $ +# +# Forwards the module metadata from distutils and setuptools to url2pkg. + +def print_depends(varname, depends): + for dep in depends: + print('%s\t%s%s' % (varname, dep.replace(' ', ''), '' if '>' in dep else '>=0')) + + +def print_var(varname, value): + if value != '': + print('var\t%s\t%s' % (varname, value)) + + +def print_cmd(cmd, arg): + print('\t'.join(('cmd', cmd, arg))) + + +def print_license(license_name): + if license_name == '': + return + print_cmd('license', license_name) + print_cmd( + 'license_default', + '%s # TODO: from setup.py; needs to be adjusted' % license_name) + + +def setup(**kwargs): + print_depends('DEPENDS', kwargs.get('requires', [])) # only for distutils.core + print_depends('DEPENDS', kwargs.get('install_requires', [])) + print_depends('TEST_DEPENDS', kwargs.get('tests_require', [])) + print_depends('BUILD_DEPENDS', kwargs.get('extras_require', {}).get('dev', [])) + print_depends('BUILD_DEPENDS', kwargs.get('setup_requires', [])) + print_var('COMMENT', kwargs.get('description', '').rstrip('.')) + print_var('HOMEPAGE', kwargs.get('url', '')) + print_license(kwargs.get('license', '')) + + # TODO: implement 'python_requires' + # example pkgsrc package: devel/py-futures + # example values: >=2.6, <3, >=2.7, !=3.0.*, !=3.1.*, !=3.2.*, !=3.3.* |
