Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix: update rpm_package noarch value based on the wheel dependencies #76

Closed
wants to merge 3 commits into from

Conversation

eagleshine
Copy link
Collaborator

@eagleshine eagleshine commented Jun 9, 2021

Description

The package_rpm build failed when there is arch dependent wheel in the dependency. An example of the log:

	error: Arch dependent binaries in noarch package
	Arch dependent binaries in noarch package
	CWD: /tmp/tmpl4j2q_9v
	source_dir: /sd/workspace/src/screwdriver.cd/sd-local/local-build
	Traceback (most recent call last):
	File "/opt/python/bin/invirtualenv", line 8, in <module>
	sys.exit(main())
	File "/opt/python/lib/python3.8/site-packages/invirtualenv/cli.py", line 137, in main
	rc, output = create_package_command(args)
	File "/opt/python/lib/python3.8/site-packages/invirtualenv/cli.py", line 107, in create_package_command
	package_file = create_package(args.package_type, source_dir=orig_directory)
	File "/opt/python/lib/python3.8/site-packages/invirtualenv/plugin.py", line 230, in create_package
	package_name = plugin(source_dir=source_dir).create_package(package_type)
	File "/opt/python/lib/python3.8/site-packages/invirtualenv/plugin_base.py", line 136, in create_package
	package = self.run_package_command(hashes, wheel_dir=wheel_dir)  # pylint: disable=E1128,E1111
	File "/opt/python/lib/python3.8/site-packages/invirtualenv_plugins/rpm.py", line 206, in run_package_command
	output = subprocess.check_output(command, env={'LANG': 'C'})
	File "/opt/python/lib/python3.8/subprocess.py", line 411, in check_output
	return run(*popenargs, stdout=PIPE, timeout=timeout, check=True,
	File "/opt/python/lib/python3.8/subprocess.py", line 512, in run
	raise CalledProcessError(retcode, process.args,
	subprocess.CalledProcessError: Command '['/usr/bin/rpmbuild', '-ba', 'package.spec']' returned non-zero exit status 1.

Related Issue

Issue: #75

Related PR: #67

Motivation and Context

How Has This Been Tested?

Screenshots (if appropriate):

Types of changes

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to change)

Checklist:

  • My code follows the code style of this project tox -e pycodestyle returns no errors.
  • My code has no unaddressed Liniting issues and the tox -e pylint command returns no errors.
  • My change requires a change to the documentation.
  • I have updated the documentation accordingly.
  • I have read the CONTRIBUTING document.
  • I have added tests to cover my changes.
  • All new and existing tests passed.

License

I confirm that this contribution is made under a BSD license and that I have the authority necessary to make this contribution on behalf of its copyright owner.

@@ -28,11 +28,12 @@ install_requires =
defusedxml
distro
jinja2
pip>=21.1
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

During deployment on older OSes invirtualenv needs to be able to run with the version of pip the OS uses so we can't add a requirement for pip without breaking stuff.

@eagleshine
Copy link
Collaborator Author

@eagleshine eagleshine closed this Jun 18, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants