pypa / pypa/setuptools

setuptools broke --no-compile option of the install command

Open
#1,603 2 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

bug Needs Triage
Dominant language
Python
Stars
2.9k
Forks
1.4k
Avg merge
1d 1h
Merged PRs (30d)
1

Description

Given the following setup.py

from setuptools import setup
# from distutils.core import setup

setup(
    name='ckcompile',
    packages=['ckcompile'],
    version='0.0.1',
    zip_safe=False,
)

and a ckcompile directory with blank __init__.py file

python setup.py install --no-compile

still creates pyc files in the site-packages directory.
The pyc files are not created when using setup from distutils.core.

Can this be corrected?

As a workaround it is possible to use python -B setup.py ... which will avoid pyc files regardless of --compile/--no-compile option.

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Reproduce the issue with the provided setup.py, the blank ckcompile/init.py, and python setup.py install --no-compile; compare the result with the distutils.core setup and the documented python -B workaround. Trace the install command's handling of --no-compile, and consider the issue done when the command no longer creates pyc files while normal compilation behavior remains intact.

Written by the indexing model from the issue text.

Assessment

Tech stack
python
Domain
build-system
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Clearly specified
Newbie friendliness
48/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.