Skip to content

Commit

Permalink
Adding solow subpackage for the installer
Browse files Browse the repository at this point in the history
  • Loading branch information
mmcky committed Feb 16, 2015
1 parent a600036 commit 4ec8120
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -93,7 +93,11 @@ def write_version_py(filename=None):
#~~~~~~~#

setup(name='quantecon',
packages=['quantecon', 'quantecon.models', "quantecon.tests"],
packages=['quantecon',
'quantecon.models',
'quantecon.models.solow',
'quantecon.tests',
],
version=VERSION,
description=DESCRIPTION,
long_description=LONG_DESCRIPTION,
Expand Down

6 comments on commit 4ec8120

@davidrpugh
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@mmcky

I didn't realize you needed to specifically add modules and submodules. I thought everything was added by default and you had to actively exclude modules and/or submodules?

@mmcky
Copy link
Contributor Author

@mmcky mmcky commented on 4ec8120 Feb 16, 2015

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@davidrpugh As far as I understand packages require to be explicitly added

From https://docs.python.org/2/distutils/setupscript.html

(Keep in mind that although package_dir applies recursively, you must explicitly list all packages in packages: the Distutils will not recursively scan your source tree looking for any directory with an init.py file.)

Thus models.solow is really another package.

@mmcky
Copy link
Contributor Author

@mmcky mmcky commented on 4ec8120 Feb 16, 2015

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@davidrpugh Just to clarify - If we had written solow as a module (i.e. in files within QuantEcon.py/models/) then it would get added to the installation. The difference here being that QuantEcon.py/models/solow is a directory of python modules and is thus a package.

@davidrpugh
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@mmcky I assume this was the reason that the statement from quantecon import solow failed when I upgraded to the new version of quantecon: solow hadn't been installed at all because it wasn't properly included in the setup script. Thanks for the clarification.

@cc7768
Copy link
Member

@cc7768 cc7768 commented on 4ec8120 Feb 16, 2015

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@mmcky Nice work. We were all looking in the wrong place, but great work.

@mmcky
Copy link
Contributor Author

@mmcky mmcky commented on 4ec8120 Feb 16, 2015

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@davidrpugh Indeed - that is why. The __init__.py files were all setup correctly - but it was just that distutils wasn't packaging the solow code through pip install --upgrade or python setup.py install etc. Thanks for sharing those developer flags for pip - I hadn't come across those before.

Thanks @cc7768.

Please sign in to comment.