| 
									
										
										
										
											2015-07-29 08:22:14 +08:00
										 |  |  | # Licensed to the Apache Software Foundation (ASF) under one or more | 
					
						
							|  |  |  | # contributor license agreements.  See the NOTICE file distributed with | 
					
						
							|  |  |  | # this work for additional information regarding copyright ownership. | 
					
						
							|  |  |  | # The ASF licenses this file to You under the Apache License, Version 2.0 | 
					
						
							|  |  |  | # (the "License"); you may not use this file except in compliance with | 
					
						
							|  |  |  | # the License.  You may obtain a copy of the License at | 
					
						
							|  |  |  | # | 
					
						
							|  |  |  | #    http://www.apache.org/licenses/LICENSE-2.0 | 
					
						
							|  |  |  | # | 
					
						
							|  |  |  | # Unless required by applicable law or agreed to in writing, software | 
					
						
							|  |  |  | # distributed under the License is distributed on an "AS IS" BASIS, | 
					
						
							|  |  |  | # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | 
					
						
							|  |  |  | # See the License for the specific language governing permissions and | 
					
						
							|  |  |  | # limitations under the License. | 
					
						
							|  |  |  | 
 | 
					
						
							| 
									
										
										
										
											2015-10-28 06:23:47 +08:00
										 |  |  | import re | 
					
						
							| 
									
										
										
										
											2016-05-07 02:10:27 +08:00
										 |  |  | import sys | 
					
						
							| 
									
										
										
										
											2024-11-29 02:26:58 +08:00
										 |  |  | from setuptools import find_packages, setup, Command | 
					
						
							| 
									
										
										
										
											2015-07-29 08:22:14 +08:00
										 |  |  | 
 | 
					
						
							| 
									
										
										
										
											2015-10-28 06:23:47 +08:00
										 |  |  | version = '' | 
					
						
							|  |  |  | with open('kafkatest/__init__.py', 'r') as fd: | 
					
						
							| 
									
										
										
										
											2016-05-07 02:10:27 +08:00
										 |  |  |     version = re.search(r'^__version__\s*=\s*[\'"]([^\'"]*)[\'"]', fd.read(), re.MULTILINE).group(1) | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  | 
 | 
					
						
							| 
									
										
										
										
											2024-11-29 02:26:58 +08:00
										 |  |  | class PyTest(Command): | 
					
						
							| 
									
										
										
										
											2016-05-07 02:10:27 +08:00
										 |  |  |     user_options = [('pytest-args=', 'a', "Arguments to pass to py.test")] | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  |     def initialize_options(self): | 
					
						
							|  |  |  |         self.pytest_args = [] | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  |     def finalize_options(self): | 
					
						
							|  |  |  |         self.test_args = [] | 
					
						
							|  |  |  |         self.test_suite = True | 
					
						
							|  |  |  | 
 | 
					
						
							| 
									
										
										
										
											2024-11-29 02:26:58 +08:00
										 |  |  |     def run(self): | 
					
						
							| 
									
										
										
										
											2016-05-07 02:10:27 +08:00
										 |  |  |         # import here, cause outside the eggs aren't loaded | 
					
						
							|  |  |  |         import pytest | 
					
						
							| 
									
										
										
										
											2018-03-16 05:42:43 +08:00
										 |  |  |         print(self.pytest_args) | 
					
						
							| 
									
										
										
										
											2016-05-07 02:10:27 +08:00
										 |  |  |         errno = pytest.main(self.pytest_args) | 
					
						
							|  |  |  |         sys.exit(errno) | 
					
						
							| 
									
										
										
										
											2015-10-28 06:23:47 +08:00
										 |  |  | 
 | 
					
						
							| 
									
										
										
										
											2017-06-30 04:28:35 +08:00
										 |  |  | # Note: when changing the version of ducktape, also revise tests/docker/Dockerfile | 
					
						
							| 
									
										
										
										
											2025-09-15 10:35:42 +08:00
										 |  |  | # Ensure the 'requests' version here matches the one specified in .github/scripts/requirements.txt | 
					
						
							| 
									
										
										
										
											2015-07-29 08:22:14 +08:00
										 |  |  | setup(name="kafkatest", | 
					
						
							| 
									
										
										
										
											2015-10-28 06:23:47 +08:00
										 |  |  |       version=version, | 
					
						
							| 
									
										
										
										
											2015-07-29 08:22:14 +08:00
										 |  |  |       description="Apache Kafka System Tests", | 
					
						
							|  |  |  |       author="Apache Kafka", | 
					
						
							| 
									
										
										
										
											2022-03-11 20:18:19 +08:00
										 |  |  |       platforms=["any"], | 
					
						
							| 
									
										
										
										
											2015-07-29 08:22:14 +08:00
										 |  |  |       license="apache2.0", | 
					
						
							|  |  |  |       packages=find_packages(), | 
					
						
							| 
									
										
										
										
											2015-08-29 02:22:39 +08:00
										 |  |  |       include_package_data=True, | 
					
						
							| 
									
										
										
										
											2025-09-03 18:29:18 +08:00
										 |  |  |       install_requires=["ducktape==0.12.0", "requests==2.32.4", "psutil==5.7.2", "pytest==8.3.3", "mock==5.1.0"], | 
					
						
							| 
									
										
										
										
											2016-05-07 02:10:27 +08:00
										 |  |  |       cmdclass={'test': PyTest}, | 
					
						
							| 
									
										
										
										
											2021-07-08 23:05:14 +08:00
										 |  |  |       zip_safe=False | 
					
						
							| 
									
										
										
										
											2015-07-29 08:22:14 +08:00
										 |  |  |       ) |