Business
Jobs
  • About Us
  • Solutions
    • Job Postings
      Post your job and receive qualified candidates in 48h.
    • Candidate Assessments
      500+ technical and psychological tests, plus anti-fraud.
    • Headhunting
      Tailor-made executive search from start to finish.
    • Payroll + EOR
      Payroll dispersal and EOR across 15+ LATAM countries.
  • Pricing
  • Jobs

0

481
Views
How to set up entry_points in setup.cfg

I am moving my config from setup.py to setup.cfg and having issues setting up the entry_points parameter. At the moment I am using a hybrid approach which works, however, I would like to move the entry_points to setup.cfg.

From

def setup_package():
    setup(version=get_version(),
          entry_points={'console_scripts':['app=my_package.app.run:cli'],})

to

[metadata]
name = my-package
description = my-package
license = unlicensed
long-description = README.md
platforms = any
classifiers =
  Programming Language :: Python

[options]
zip_safe = False
packages = my_package,  my_package.app
include_package_data = True
package_dir =
  = .
tests_require = pytest; pytest-cov

[entry_points]
console_scripts =
  my-package = my_package.app.run:cli
over 4 years ago · Santiago Trujillo
2 answers
Answer question

0

The section must be [options.entry_points]. See an example at https://github.com/github/octodns/blob/4b44ab14b1f0a52f1051c67656d6e3dd6f0ba903/setup.cfg#L34

[options.entry_points]
console_scripts =
    octodns-compare = octodns.cmds.compare:main
    octodns-dump = octodns.cmds.dump:main
    octodns-report = octodns.cmds.report:main
    octodns-sync = octodns.cmds.sync:main
    octodns-validate = octodns.cmds.validate:main
over 4 years ago · Santiago Trujillo Report

0

With python 3.6 and setuptools 39.0.1, i had like you to move entry points from .py to .cfg.

My setup.py, focused on the entry points declaration:

from setuptools import setup

setup(
    entry_points={
        'pytest11': [
            'mytest = mytest.plugin',
        ],
    },
)

I ended up with this working setup.cfg:

... # other standard declarations

[options.entry_points]
pytest11 =
    mytest = mytest.plugin
over 4 years ago · Santiago Trujillo Report
Answer question
Find remote jobs

Discover the new way to find a job!

Top jobs
Top job categories
Business
Post vacancy Pricing Sales
Legal
Terms and conditions Privacy policy
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Show me some job opportunities
There's an error!