File: genomicsdbproto.sh

package info (click to toggle)
genomicsdb 1.4.4-3
  • links: PTS, VCS
  • area: main
  • in suites: bookworm
  • size: 24,788 kB
  • sloc: cpp: 78,988; ansic: 58,119; java: 8,531; python: 2,270; sh: 1,850; perl: 1,621; makefile: 490; xml: 455
file content (62 lines) | stat: -rw-r--r-- 1,440 bytes parent folder | download | duplicates (2)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
#!/bin/bash

## Build script for genomicsdbproto python package

SRC=../src/resources/
BUILD=./proto/genomicsdbproto

mkdir -p proto/genomicsdbproto

## Step1: Generate python code from proto
protoc --proto_path=$SRC --python_out=$BUILD $SRC/*.proto

cd proto

## Step2: Setup package

sed -i 's/import genomicsdb_/from . import genomicsdb_/g' genomicsdbproto/*.py

cp ../../LICENSE .

cat << EOF > README.md
# GenomicsDB Protocol buffers for Python

This offers protocol buffers for GenomicsDB [GenomicsDB](https://github.com/GenomicsDB/GenomicsDB/)
EOF

touch genomicsdbproto/__init__.py

cat <<EOF > setup.py 
import setuptools
from distutils.core import setup

with open("README.md", "r") as fh:
  long_description = fh.read()

setuptools.setup(
  name="genomicsdbproto",
  version="0.0.1",
  author="Melvin Lathara",
  author_email="melvin@omicsautomation.com",
  description="Protocol buffers for GenomicsDB",
  long_description=long_description,
  long_description_content_type="text/markdown",
  url="https://github.com/GenomicsDB/GenomicsDB",
  packages=setuptools.find_packages(),
  install_requires=['protobuf','wheel'],
  python_requires='>=3.0',
  classifiers=[
    "License :: OSI Approved :: MIT License",
    "Operating System :: OS Independent",
  ],
)
EOF

## Step3: Create the wheel
python3 -m venv venv
source venv/bin/activate

pip3 install --upgrade pip setuptools wheel

python3 setup.py sdist bdist_wheel
deactivate