Skip to main content

Cython functions to speed up Brightway2 LCA calculations

Project description

# Brightway2 speedups

A series of function written in [Cython]( that speed up critical functions to improve the overall performance of the [Brightway2 life cycle assessment framework](

In order to avoid having to have Cython as a dependency, this library includes both the pyx and Cython-generated c code, and is distributed as pre-compiled [wheels](, except on Linux where access to a C compiler is assumed.

## Building C files

cython -t bw2speedups/_consolidate.pyx bw2speedups/_indexer.pyx bw2speedups/_find_first.pyx

## Building shared libraries

Although you can do this inplace, in my experience it is easier to just install the library in a temporary environment. You don’t want to deal with .so files in the source repository.

## Testing

Install the library into a temporary environment, then manually run the separate test files, i.e. python bw2speedupds/test/ This isn’t the most elegant, but it will do for now.

## Building wheels

pip install wheel python bdist_wheel

Note that this has to be done separately for each OS and environment, i.e. Windows 32-bit and 64-bit versions of Python are separate wheels, even with the same version of Windows.

Project details

Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Filename, size & hash SHA256 hash help File type Python version Upload date
bw2speedups-2.3.tar.gz (152.8 kB) Copy SHA256 hash SHA256 Source None

Supported by

Elastic Elastic Search Pingdom Pingdom Monitoring Google Google BigQuery Sentry Sentry Error logging AWS AWS Cloud computing DataDog DataDog Monitoring Fastly Fastly CDN SignalFx SignalFx Supporter DigiCert DigiCert EV certificate StatusPage StatusPage Status page