setuptools setup options parameter

Viewed 66

I'm trying to use briefcase to distribute a package across operating systems (following tutorials from BeeWare). However, I'm more familiar with managing packages through poetry. I found a page combining the two here. However, at the final part of the tutorial when it comes to poetry run python setup.py linux -s, I get this message: error: invalid command 'linux'.

setup() in setup.py looks like this:

setup(
    name=<my-details>, # Personal details ommitted here
    version=version,
    description=<my-details>,
    long_description=long_description,
    author=<my-details>,
    author_email=<my-details>,
    license='BSD license',
    packages=find_packages(
        exclude=[
            'docs', 'tests',
            'windows', 'macOS', 'linux',
            'iOS', 'android',
            'django'
        ]
    ),
    classifiers=[
        'Development Status :: 1 - Planning',
        'License :: OSI Approved :: BSD license',
    ],
    install_requires=[
    ],
    options={
        'app': {
            'formal_name': <my-details>,
            'bundle': 'com.example'
        },

        # Desktop/laptop deployments
        'macos': {
            'app_requires': [
                'toga-cocoa==0.3.0.dev15',
            ]
        },
        'linux': {
            'app_requires': [
                'toga-gtk==0.3.0.dev15',
            ]
        },
        'windows': {
            'app_requires': [
                'toga-winforms==0.3.0.dev15',
            ]
        },

        # Mobile deployments
        'ios': {
            'app_requires': [
                'toga-ios==0.3.0.dev15',
            ]
        },
        'android': {
            'app_requires': [
                'toga-android==0.3.0.dev15',
            ]
        },

        # Web deployments
        'django': {
            'app_requires': [
                'toga-django==0.3.0.dev15',
            ]
        },
    }
)

I've tried searching for what 'options' actually does, but I can only find this which provides the one line description 'A dictionary providing the default options for the setup script.'.

According to the tutorial, running the setup command should cause a blank window to open (which does happen if I follow the BeeWare tutorial by running just with briefcase). I'd rather use poetry as the main management tool as I'm more comfortable with it, so I'd like to know how the options parameter works, what it's doing and how I can get it to load correctly. Thanks.

0 Answers
Related