Bfg9000

Latest version: v0.7.1

Safety actively analyzes 681775 Python packages for vulnerabilities to keep your Python projects secure.

Scan your dependencies

Page 1 of 3

0.8.0

No changes yet

---

0.7.1

Bug fixes
- When using the `PKG_CONFIG_PATH` specified by mopack, add it to any existing
`PKG_CONFIG_PATH` from the environment
- Don't explicitly include default `include` paths on CC-like compilers

---

0.7.0

New features
- Add support for resolving external package dependencies via [mopack][mopack]
- Add `bfg9000 run` command to allow executing other commands using the
environment variables for a given build
- Add support for installing man pages
- Add `--datadir` and `--mandir` configuration options
- Create `compile_commands.json` when generating build scripts
- `pkg-config` executable can now be found by guessing based on other compilers
- Compiler and tool objects now have a `found` property to indicate if they were
found on the system
- Add `system` flag to `package()` and `pkg_config()` to determine whether to
treat include directories from packages as system directories
- Add `bfg9000 generate-completion` to generate shell-completion functions
- Add support for `CLICOLOR` and `CLICOLOR_FORCE` environment variables to
control whether to display colors in terminal output

Breaking changes
- Require Python 3.6+
- Qt dependencies are now specified via `package('Qt', '<component>')` rather
than `package('Qt<component>')`
- bfg9000 no longer automatically installs `patchelf` on Linux systems

Bug fixes
- Error reporting now shows the proper stack frames on Windows
- Fix detection of `clang-cl` compiler
- MinGW can now use libraries of the form `name.lib`
- Paths with basenames of `.` or `..` are now treated as directories
- Improve support for detecting tool versions when generating MSBuild files
- Empty strings as command-line arguments (e.g. in `command`) are now properly
quoted
- *pkg-config* `.pc` files now always use POSIX-like paths
- Fix display of the traceback in a bfg file when building from the build
directory
- Replace `packaging` dependency with `verspec` for future stability

[mopack]: https://jimporter.github.io/mopack/

---

0.6.0

New features
- Add support for including multiple `build.bfg` (and `options.bfg`) files from
subdirectories via `submodule()`
- Create `-uninstalled` variants of generated *pkg-config* `.pc` files and
allow build scripts to use them internally
- Add `opts.gui` to generate graphical programs (important on Windows)
- Add `opts.static` to request static linking of libraries
- MSVC's runtime can now be selected by using a combination of `opts.static`
and `opts.debug`
- MSVC linker now automatically links to default Windows libraries
(`kernel32.lib`, etc)
- Link steps (`executable`, `library`, etc) now accept an `extra_compile_deps`
argument to forward on to the compilation step
- Allow customizing `install` locations for specific files via the `directory`
argument
- Iterables passed to `default` or `install` will include each element of the
iterable in the appropriate build target
- `info()`, `debug()`, and `warning()` now take a variable number of arguments
to print
- `generated_source()` steps are now automatically created as necessary for
files passed to `object_file()`, if possible
- Add `path_exists()` builtin
- Paths with a trailing `/` are now treated as directory paths, and when passed
to `auto_file()` will create a directory object
- Add support for compiling Windows `.rc` files
- Add support for setting the entry point for native binaries (C, C++, etc)
- The default list of excluded globs for `find_files()` can now be customized
via `project(find_exclude=[...])`
- Try to find the right compiler to use for C-family languages by guessing based
on other compilers in the family (e.g. if `CXX=g++`, guess that the C compiler
is `gcc`)
- Add support for `DESTDIR` on Windows when installation paths don't include a
drive letter
- Regenerating build files with the Ninja backend now uses the `console` pool,
allowing realtime output and colored text

Breaking changes
- Drop support for Python 2
- `find_files()` and `find_paths()` have been redesigned to support recursive
globs
- `pkg_config()` now defaults to `auto_fill=False`
- `resource_file()` has been deprecated; use `source_file()` instead
- `show_stack` for `info()` and `debug()` must now be specified as a keyword
argument
- `directory`, and `header_directory` now require uncommon arguments to be
specified as keyword arguments
- Adding to existing environment variables in `env.execute()` and `env.run()`
is now done via `extra_env`, not `env`/`env_update`

Bug fixes
- `copy_file()` now works correctly when copying into a subdirectory on the
Make backend
- `extra_deps` now works with `copy_file()`
- Calling `exit()` with a non-zero return code from a `build.bfg` file now
causes configuration to fail
- Automatically-generated PCH source files (for MSVC compilers) are now placed
in the same directory as the resulting PCH
- The contents of header directories in the build directory are now installed to
the base include directory
- The `install_name` for libraries on macOS is now always an absolute path,
instead of using `rpath`-based paths prior to installation
- MSBuild backend can now build libraries with no source files that link to a
whole-archive library
- Object files with unrecognized source languages can now be linked with the
default linker for their object format
- `.stamp` files generated by the Make backend are now properly removed when
running `make clean`
- Fix `sudo` prompt when installing to a system directory with the Ninja backend

---

0.5.1

Bug fixes
- Depfiles generated by compile steps are now properly included into Makefiles
- Include directories passed to via `include` and libraries passed via `libs`
are now listed before those from `packages` when building
- Fix linking to shared libraries located in the source directory

---

0.5.0

New features
- Add `generated_source()` to allow generating source code from domain-specific
languages
- Add support for `lex`, `yacc`, and Qt build tools (`moc`, `rcc`, `uic`)
- Add the ability to use placeholders for `build_step()` and `command()`
- Add an `auto_file()` function that infers the kind of file based on its
extension; `build_step()` now uses this by default for outputs
- Add `always_outdated` argument to `build_step()`
- Add `copy_file()` and `copy_files()` functions
- `default()` now returns the files passed into it
- `install()` now returns the installed forms of the files passed into it
- Add `safe_str()` and `safe_format()` to help safely build command string
- Expose `Path` object to bfg scripts
- Add `directory` as an option for `object_file()`, `generated_source()`,
`copy_file()`, and their list-variants
- Add `lang` and `intermediate_dirs` arguments to `project()` for modifying
project-wide settings
- Add `srcdir` builtin to toolchain files

Breaking changes
- `find_files()` redesigned and split into `find_files()` and `find_paths()`;
simple cases should still work, but more complex uses will need adjusted
- *pkg-config* `.pc` files generated by bfg9000 no longer include rpath flags
- Explicitly passing `lang` to a build step now overrides the languages of any
input files when determining the builder
- `args` and `kwargs` no longer supported for `build_step()`; use a lambda
instead
- Options specified on the command line (e.g. install locations) now override
settings in toolchain files
- Implicitly-defined object files (e.g. those generated by `executable()`) are
placed in an intermediate directory; call `project(intermediate_dirs=False)`
to disable this

Bug fixes
- Include `options.bfg` in dist tarballs
- Fix escaping of `~` in Makefiles
- Symbolic links (e.g. from versioned shared libraries) are now properly
installed as symlinks
- Generated header directories are now included as dependencies of compilation
steps
- Default install locations are now based on the *target* platform instead of
the host platform, with cross-platform builds defaulting to installation
disabled
- Shared libraries with `soversion`s can now be used with `pkg_config()`

---

Page 1 of 3

© 2024 Safety CLI Cybersecurity Inc. All Rights Reserved.