Skip to main content
Pybrood
=======

|docs|

Binding made as from-scratch code generator, outputting msvc project.

Requirements
------------

- Windows 7 32 bit (just exactly SSCAIT requirement)
NOTE: I couldn't successfully run BWAPI injector under Wine,
although recently I've been told
`it's
possible <https://github.com/TorchCraft/TorchCraft/blob/master/docs/user/bwapi_on_linux.md>`__.
- `Python
3.5 <https://www.python.org/ftp/python/3.5.2/python-3.5.2.exe>`__
- `Visual C++ build
tools <http://landinghub.visualstudio.com/visual-cpp-build-tools>`__
or complete Visual Studio.
NOTE: pick the version of compiler/studio considering `build tools
used by python <https://wiki.python.org/moin/WindowsCompilers>`__
- `BWAPI 4.1.2
sources <https://github.com/bwapi/bwapi/releases/tag/v4.1.2>`__
you need ``BWAPI.lib`` and ``BWAPIClient.lib`` built against chosen
compiler to link pybrood module
- Most fresh (dec 2016) `Pybind11
headers <https://github.com/pybind/pybind11>`__

Building BWAPI.lib and BWAPIClient.lib
--------------------------------------

| You may experience "access denied" errors while working directly in
"program files/BWAPI".
| Better use separately cloned git repo of BWAPI where you have full
access.

| For ``msbuild`` invocation use special VC++ related cmd shell from
Launch menu.
| Otherwise you can use usual cmd shell.

#. Make some changes in bwapi source files first:

- | little fix in ``bwapi/include/BWAPI/SetContainer.h:54``:
| at very end of class add

``SetContainer& operator=(const SetContainer&) = default;``

to get rid of "attempting to reference a deleted function" error.

- disable mass file copying in ``bwapi/BWAPILIB/BWAPILIB.vcxproj``:

- line 64: ``<PreLinkEvent>`` → ``<!-- PreLinkEvent>``

- line 94: ``</PreLinkEvent>`` → ``</PreLinkEvent -->``

- create file ``bwapi/svnrev.h``:

``static const int SVN_REV = 4708; #include "starcraftver.h"``

This prevents "Client and Server are not compatible" error.

#. Build BWAPI.lib:

``cd bwapi\BWAPILIB\ msbuild /p:PlatformToolset=v140 /p:Configuration=Release /p:Platform=Win32``

Output file is ``bwapi/lib/BWAPI.lib``.

#. Build BWAPIClient.lib:

``cd bwapi\BWAPIClient\ msbuild /p:PlatformToolset=v140 /p:Configuration=Release /p:Platform=Win32``

Output file is ``bwapi/lib/BWAPIClient.lib``.

Building Pybrood
----------------

#. Setup paths in `config.py <generator/config.py>`__.
#. Run the generator ``python3.5 -m generator``.
#. ``cd`` to freshly generated ``output`` folder and run ``build.bat``
(it's just the same msbuild command).
#. Copy/symlink ``output/Release/inner.pyd`` into ``pybrood`` directory.
``inner.pyd`` is a required submodule of ``pybrood``.
#. Now you should be able to ``import pybrood``.

Documentation
-------------

`Read the docs <http://pybrood.readthedocs.io/en/latest/>`__

You can also build your local copy of documentation after running the
generator:

::

cd output/docs/
sphinx-build . -b html _build/html

.. |docs| image:: https://readthedocs.org/projects/pybrood/badge/?version=latest
:target: http://pybrood.readthedocs.io/en/latest/

Metadata

Release files for pybrood 0.9.0

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Built distribution (wheel)

Table of built distributions (wheels) for pybrood 0.9.0
File Interpreter ABI Platform Actions
pybrood-0.9.0-py3-none-win32.whl Python 3 none Windows x86-32 Details for pybrood-0.9.0-py3-none-win32.whl

Release files / pybrood-0.9.0-py3-none-win32.whl

Download URL pybrood-0.9.0-py3-none-win32.whl
Size 385.2 kB
Tags Python 3 Windows x86-32
SHA-256 checksum
How to use checksums
e9e84078342a2811f4d512d62eb5c7e79a442649b0dbe0a37c19c974d64d112a
BLAKE2b-256 checksum
How to use checksums
1e2622e6e2645c758c6d181ce6814393fa73d0db4ece8d290b44b480034e018c
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No

Security for pybrood 0.9.0

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

No provenance found

None of the files in this release were uploaded with provenance metadata.

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page