## Expected behavior and actual behavior.

There is a strange interaction between loading spatialite 4.3.0 and shapely 1.7.0. I am not sure where exactly the error is happening so I am reporting the issue in both repositories.

The expected behavior is that one should be able to import shapely after loading spatialite without a segmentation faulth.

The actual behavior is that laoding shapely after loading spatialite produces a segmentation fault.

## Steps to reproduce the problem.


```
from sqlalchemy import create_engine
from sqlalchemy.event import listen


def load_spatialite(api_connection, connection_record):
    api_connection.enable_load_extension(True)
    api_connection.load_extension('mod_spatialite.so')


engine =
listen(engine, 'connect', load_spatialite)


# from shapely import speedups  # Remove comment to avoid segmentation fault
engine_connection = engine.connect()
from shapely import speedups
```


Running the above code produces the following segmentation fault:
```
python: ByteOrderValues.cpp:46: static int geos::io::ByteOrderValues::getInt(const unsigned char*, int): Assertion `byteOrder == ENDIAN_LITTLE' failed.
Aborted (core dumped)
```


Removing the comment prevents the segmentation fault.

## Operating system

Fedora 31