Skip to content

Don't install unittest code by default #1027

Closed
@priv-kweihmann

Description

@priv-kweihmann
Contributor

When doing python3 setup.py install on a local checkout of the code, files from git/test will be installed into the standard site-packages directory.
This mean that theoretically even the requirements from test-requirements.txt are mandatory for the base package and secondly it isn't necessary as the chances that an user is actually using the test code are pretty low.
So overall it doesn't make much sense to me.

Is there any way to avoid having the test files installed via setuptools?

Activity

Byron

Byron commented on Jul 7, 2020

@Byron
Member

Thanks for bringing this up! I agree with the sentiment and believe it would be preferable not to package and install test files.

Maybe these can be excluded during packaging? Help is greatly appreciated, as I only remember the incredible pain that setup.py inflicted on me.

priv-kweihmann

priv-kweihmann commented on Jul 8, 2020

@priv-kweihmann
ContributorAuthor

I'm pretty sure that this is possible - I think it requires just some magic in setup.py and the MANIFEST.in.
BTW I think the tests itself should be in the root directory rather than a subdir of the module itself - is there a reason for them being placed where they are right now?

I'll see if I could come up with a PR for it

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

      Development

      Participants

      @Byron@priv-kweihmann

      Issue actions

        Don't install unittest code by default · Issue #1027 · gitpython-developers/GitPython