| @@ -1,15 +1,15 @@ | | | @@ -1,15 +1,15 @@ |
1 | #! @PYTHONBIN@ | | 1 | #! @PYTHONBIN@ |
2 | # $NetBSD: url2pkg.py,v 1.47 2023/04/22 13:21:58 rillig Exp $ | | 2 | # $NetBSD: url2pkg.py,v 1.48 2023/06/11 07:42:16 wiz Exp $ |
3 | | | 3 | |
4 | # Copyright (c) 2019 The NetBSD Foundation, Inc. | | 4 | # Copyright (c) 2019 The NetBSD Foundation, Inc. |
5 | # All rights reserved. | | 5 | # All rights reserved. |
6 | # | | 6 | # |
7 | # This code is derived from software contributed to The NetBSD Foundation | | 7 | # This code is derived from software contributed to The NetBSD Foundation |
8 | # by Roland Illig. | | 8 | # by Roland Illig. |
9 | # | | 9 | # |
10 | # Redistribution and use in source and binary forms, with or without | | 10 | # Redistribution and use in source and binary forms, with or without |
11 | # modification, are permitted provided that the following conditions | | 11 | # modification, are permitted provided that the following conditions |
12 | # are met: | | 12 | # are met: |
13 | # 1. Redistributions of source code must retain the above copyright | | 13 | # 1. Redistributions of source code must retain the above copyright |
14 | # notice, this list of conditions and the following disclaimer. | | 14 | # notice, this list of conditions and the following disclaimer. |
15 | # 2. Redistributions in binary form must reproduce the above copyright | | 15 | # 2. Redistributions in binary form must reproduce the above copyright |
| @@ -1021,26 +1021,27 @@ class Adjuster: | | | @@ -1021,26 +1021,27 @@ class Adjuster: |
1021 | | | 1021 | |
1022 | if not self.wrksrc_isfile('setup.py'): | | 1022 | if not self.wrksrc_isfile('setup.py'): |
1023 | return | | 1023 | return |
1024 | | | 1024 | |
1025 | cmd = f'{self.g.pythonbin} setup.py build' | | 1025 | cmd = f'{self.g.pythonbin} setup.py build' |
1026 | env = { | | 1026 | env = { |
1027 | 'PYTHONDONTWRITEBYTECODE': 'x', | | 1027 | 'PYTHONDONTWRITEBYTECODE': 'x', |
1028 | 'PYTHONPATH': f'{self.g.libdir}/python' | | 1028 | 'PYTHONPATH': f'{self.g.libdir}/python' |
1029 | } | | 1029 | } |
1030 | self.read_dependencies(cmd, env, self.abs_wrksrc, 'py-', '${PYPKGPREFIX}-') | | 1030 | self.read_dependencies(cmd, env, self.abs_wrksrc, 'py-', '${PYPKGPREFIX}-') |
1031 | | | 1031 | |
1032 | self.pkgname_prefix = '${PYPKGPREFIX}-' | | 1032 | self.pkgname_prefix = '${PYPKGPREFIX}-' |
1033 | self.categories.append('python') | | 1033 | self.categories.append('python') |
| | | 1034 | self.extra_vars.append(Var('PYTHON_VERSIONS_INCOMPATIBLE', '=', '27')) |
1034 | self.includes.append('../../lang/python/egg.mk') | | 1035 | self.includes.append('../../lang/python/egg.mk') |
1035 | | | 1036 | |
1036 | def adjust_cargo(self): | | 1037 | def adjust_cargo(self): |
1037 | if not self.wrksrc_isfile('Cargo.lock'): | | 1038 | if not self.wrksrc_isfile('Cargo.lock'): |
1038 | return | | 1039 | return |
1039 | | | 1040 | |
1040 | # pull name and version from package entries | | 1041 | # pull name and version from package entries |
1041 | with self.wrksrc_open('Cargo.lock') as f: | | 1042 | with self.wrksrc_open('Cargo.lock') as f: |
1042 | name = '' | | 1043 | name = '' |
1043 | version = '' | | 1044 | version = '' |
1044 | for line in f: | | 1045 | for line in f: |
1045 | if line.startswith('[[package]]'): | | 1046 | if line.startswith('[[package]]'): |
1046 | # new package, reset name and version to be safe | | 1047 | # new package, reset name and version to be safe |