9/28/2023 0 Comments Python debian package![]() ![]() Most advice I find while googling are just examples of nasty hacks that don't even use python-support or python-central. v2.5 and v2.6 on Ubuntu 9.04 (Jaunty Jackalope). ![]() The packaging script must use python-support to provide the correct bytecode for possible multiple installations of Python on a target platform, i.e. The Python package for testing purposes will just be a directory with an empty _init_.py file and a single Python module, package_test.py. The Python package will be pure Python without C extensions. $ cat > setup.py #!/usr/bin/python from setuptools import setup _author_ = ‘Your Full Name’ setup( name=’tvb-neurodebian’, version=’0.0.I need to write, or find, a script to create a Debian package, using package python-support, from a Python package. Now we have to create a python setup script for local python setup.py install. & cat > tvb-neurodebian.py #!/usr/bin/env python import tvb tvb.main() No go back to our main directory and creat the tvb file. ![]() ![]() $ cat > _init_.py from _future_ import print_function import argparse print(‘The Virtual Brain imported!’) def parse_args(): parser = argparse.ArgumentParser() parser.add_argument(‘text’, help=’Text to TVB-Neuropackage’) return parser.parse_args() def main(): print(‘This is the main function :)’) args = parse_args() print(args.text) Now create a _init_.py for allowing the directory to be imported to python, and type our simple script. $ mkdir project_name & cd project_nameĬreate another directory inside the project name and move to the newly directory. We will begging by writing a simple python script with we will be packaging it letter.Ĭreate a project directory and go to the created directory. ![]()
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |