Pre-release
This release is a pre-release and may not be stable for production use.
# python-mockchroot
Python library for using Mock (the chroot-based build tool, not the mockup library)
## How do I use this?
Here is a quick example for building an EPEL7 RPM packge from a sources
dircetory and a spec file, where the build configuration comes from
Fedora Koji:
out_dir = '/tmp/results'
mock = MockChroot(config=mock_config.compose(
mock_config.from_koji(target='epel7-build', koji_profile='koji'),
mock_config.to['resultdir'].set(out_dir),
mock_config.to['root_cache_enable'].set(True),
mock_config.to['yum_cache_enable'].set(True)
))
print('Building SRPM in Mock')
mock.buildsrpm(
spec='/path/to/package.spec',
sources='/path/to/package/sources'
)
srpms = glob('{0}/*.src.rpm'.format(out_dir))
if len(srpms) == 0:
raise RuntimeError('no srpms found in {0}'.format(out_dir))
elif len(srpms) > 1:
raise RuntimeError('multiple srpms found in {0}'.format(out_dir))
else:
srpm = srpms[0]
print('Building RPM in Mock')
mock.rebuild(src_rpm=srpm, no_clean=True)
## Tell me more!
Please see the comprehensive documentation at [readthedocs][1]
[1]: http://python-mockchroot.readthedocs.org/
## How do I install this?
You can use *pip*:
pip install mock-chroot
Python library for using Mock (the chroot-based build tool, not the mockup library)
## How do I use this?
Here is a quick example for building an EPEL7 RPM packge from a sources
dircetory and a spec file, where the build configuration comes from
Fedora Koji:
out_dir = '/tmp/results'
mock = MockChroot(config=mock_config.compose(
mock_config.from_koji(target='epel7-build', koji_profile='koji'),
mock_config.to['resultdir'].set(out_dir),
mock_config.to['root_cache_enable'].set(True),
mock_config.to['yum_cache_enable'].set(True)
))
print('Building SRPM in Mock')
mock.buildsrpm(
spec='/path/to/package.spec',
sources='/path/to/package/sources'
)
srpms = glob('{0}/*.src.rpm'.format(out_dir))
if len(srpms) == 0:
raise RuntimeError('no srpms found in {0}'.format(out_dir))
elif len(srpms) > 1:
raise RuntimeError('multiple srpms found in {0}'.format(out_dir))
else:
srpm = srpms[0]
print('Building RPM in Mock')
mock.rebuild(src_rpm=srpm, no_clean=True)
## Tell me more!
Please see the comprehensive documentation at [readthedocs][1]
[1]: http://python-mockchroot.readthedocs.org/
## How do I install this?
You can use *pip*:
pip install mock-chroot
Metadata
Release files for mock-chroot 0.0.1.dev4
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | |
|---|---|---|---|
| mock_chroot-0.0.1.dev4.tar.gz | 19.2 kB | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| mock_chroot-0.0.1.dev4-py2-none-any.whl | Python 2 | none | any | Details |
Total release size: 30.1 kB
Release files / mock_chroot-0.0.1.dev4.tar.gz
| Download URL | mock_chroot-0.0.1.dev4.tar.gz |
|---|---|
| Size | 19.2 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
093d6542b2cc8301a78ceb471b8dd64c57c75abb5c29a2bf21e79f525caa3232
|
|
BLAKE2b-256 checksum How to use checksums |
d3ed13cabd835e0cdbe0dfa3619cfb81c8bbf75a6237a5b0960b9010d371eb23
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
Release files / mock_chroot-0.0.1.dev4-py2-none-any.whl
| Download URL | mock_chroot-0.0.1.dev4-py2-none-any.whl |
|---|---|
| Size | 11.0 kB |
| Tags | Python 2 |
|
SHA-256 checksum How to use checksums |
9123dff6000bb9ac65a45e2529d02ea584832979a2043799c9302ad6e537db41
|
|
BLAKE2b-256 checksum How to use checksums |
ff403fffc03b1f83c6c3df16e871ade553c0ba9c77c981da5628e69db65b2f2e
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |