Skip to content

package_dir in setup.cfg #1259

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
hectormartinezdev opened this issue Jan 24, 2018 · 1 comment
Closed

package_dir in setup.cfg #1259

hectormartinezdev opened this issue Jan 24, 2018 · 1 comment

Comments

@hectormartinezdev
Copy link

Setuptools version: 38.4.0
Python version: 2.7.12
Ubuntu version: 16.04

Hey! I'm moving all my options from setup.py to setup.cfg so I can have a clean setup.py:

"""Minimal setup.py."""
from setuptools import setup
from setuptools.config import read_configuration

conf_dict = read_configuration('setup.cfg')

setup()

But I'm having a problem with the package_dir option.

My package lives inside src folder and while I can do package_dir={"":"src"} in the setup.py, but I can't use it properly in the setup.cfg.

What I tried so far? (I tried more combinations, but they give an error)

[options]
package_dir =
    . = src
[options]
package_dir =
    "" = "src"
[options]
package_dir =
   "."  = src

With this options, when I run python setup.py egg_info it leads to.. "package directory <package_name> not found".

Any insight? Thank you :D

@hectormartinezdev
Copy link
Author

I'm sorry for opening this, the combination:

[options]
package_dir =
     = src

works fine for Python3, but for Python 2 still fails.

It is related with #1136 and will be fixed with the #1180 I suppose. Until them, I will put packages_dir in the setup.py.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant