osdir.com


[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

python package management confusion


Hi,

I am a newbie completely confused with python package management.

I have a setup.py file (listed below) and have setup pip and setup.cfg to install my own dependencies  from a local devpi repository.

Can setup.py reference a git repository so that I can install from that url?

Is this possible in newer versions of setuptools? Does anyone have any examples? 

Completely confused with managing packages in python....


Kind regards

dcs3spp

*************** setup.py ******************

import os
import sys

from setuptools import setup, find_packages

here = os.path.abspath(os.path.dirname(__file__))
with open(os.path.join(here, 'README.md')) as f:
    README = f.read()
with open(os.path.join(here, 'CHANGES.md')) as f:
    CHANGES = f.read()

requires = [
    'cryptography',
    'odfpy',
    'PyJWT',
    'pycrypto',
    'pyramid',
    'pyramid_core',      # currently installed from devpi...can setup.py use git+ssh url like pip requirements.txt file?
    'pyramid_debugtoolbar',
    'pyramid_tm',
    'requests==2.18.4',
    'SQLAlchemy',
    'transaction',
    'zope.sqlalchemy',
    'waitress',
    'psycopg2-binary',
    'python-dateutil',
    'uwsgi',
    'marshmallow-sqlalchemy',
    ]

setup_requires = [
    'pytest-runner',
]

tests_require = [
    'boto3',
    'lovely-pytest-docker',
    'pytest',
    'pytest-cov',
    'tuspy',
    'WebTest >= 1.3.1',
]

setup(name='api',
      version='0.0',
      description='api',
      long_description=README + '\n\n' + CHANGES,
      classifiers=[
          "Programming Language :: Python",
          "Framework :: Pyramid",
          "Topic :: Internet :: WWW/HTTP",
          "Topic :: Internet :: WWW/HTTP :: WSGI :: Application",
      ],
      author='simon pears',
      author_email='roughlea-music at outlook.com',
      url='',
      keywords='web wsgi bfg pylons pyramid',
      packages=find_packages('src'),
      package_dir={'': 'src'},
      include_package_data=True,
      zip_safe=False,
      extras_require={
          'testing': tests_require,
      },
      install_requires=requires,
      setup_requires=setup_requires,
      tests_require=tests_require,
      test_suite='tests',
      entry_points="""\
      [paste.app_factory]
      main = api:main
      [console_scripts]
      initialize_api_db = api.scripts.initializedb:main
      """,
      )