Skip to content

Latest commit

 

History

History
72 lines (48 loc) · 2.05 KB

CONTRIBUTING.md

File metadata and controls

72 lines (48 loc) · 2.05 KB

Parse and generate tab-separated values (TSV) data

This C extension module uses the Python Limited API targeting Python 3.8 and later.

Installing the build environment

The following steps demonstrate how to create a development environment suitable for building tsv2py from source on Amazon Linux.

Creating a local build

Building the source code requires a C compiler such as gcc or clang. The following commands install a C compiler and the Python development headers on AWS Linux:

sudo yum groupinstall -y "Development Tools"
sudo yum install -y python3-devel python3-pip

Install the Python build front-end for creating Python packages:

python3 -m pip install build

Publishing to PyPI

Docker is required to create packages for PyPI in an isolated environment:

sudo yum install -y docker
sudo systemctl start docker
sudo systemctl enable docker
sudo usermod -aG docker ec2-user
newgrp docker

cibuildwheel helps create packages for PyPI that target multiple platforms:

python3 -m pip install cibuildwheel

Building from source

First, you need to clone the project repository:

git clone https://github.com/hunyadi/tsv2py.git

If you want to create a package locally, simply invoke the build front-end:

python3 -m build

If you would like to create several packages for multiple target platforms, use cibuildwheel:

cibuildwheel --platform linux

Optionally, scan for possible ABI3 violations and inconsistencies with abi3audit:

abi3audit wheelhouse/*-cp3*.whl

Finally, use scp to copy files from Amazon Linux to a local computer. 1.2.3.4 stands for the IP address of the EC2 machine. tsv2py.pem is a certificate to connect to the remote EC2 machine.

scp -r -i ~/.ssh/tsv2py.pem [email protected]:/home/ec2-user/tsv2py/wheelhouse/ wheelhouse