Question

I am trying to create a distributable package for my python project. Python 2.7

I have a setup.py file that includes the following:

from setuptools import setup, find_packages
import sys, os

version = '1.0'

setup(name='my_lovely_package',
  version=version,
  description="this is mine",
  long_description="""it is lovely\
""",
  classifiers=[
          'Development Status :: 5 - Production/Stable'
          'Operating System :: Microsoft :: Windows',
          'Programming Language :: Python :: 2.7',
          ],
  keywords='mypkg',
  author='me',
  packages=find_packages(),
  include_package_data=True,
  zip_safe=True,
  install_requires=[
      'nose',
      'selenium' 
  ],
  )

I built the dist with "setup.py sdist" and stuck it on a remote repository. In a clean python environment, I run the following:

easy_install http://my.path.to.zip.file

No errors are thrown. I go to my home directory, C:\Python27\Lib\site-packages. Nose and Selenium directories are there as expected. But all I see for my custom package is a single mypkg-1.0.egg. There is no directory containing the source files I expected.

The downloaded .zip file itself contains all of the expected directories and init files, so I know it's not an issue of those getting included in the build. I am NOT trying to include package data, just my .py files

Am I doing something wrong in the install process??

Was it helpful?

Solution

Fixed by using pip instead of setuptools to install.

Don't know enough about the differences between the two to understand why that's the case, but pip works without any code or folder modifications.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top