Category : setuptools

Let’s say we create a private python package, that depends on another private python hosted in a private enterprise PyPi repository (artifactory). The setup.cfg looks as follows, [options] python_requires = >= 3.6, <3.9.0a0 setup_requires = setuptools >= 46.4.0 wheel install_requires = [ keyring private-pkg1 >= 0.1.0 private-pkg2 >= 0.1.0 simple-parsing ] $HOME/.pip/pip.confg is configured download ..

Read more

I’m trying to build a .whl and one of my dependencies is the Bloomberg api located at https://bcms.bloomberg.com/pip/simple/ In my requirements.txt file I simply have the flag –extra-index-url=https://bcms.bloomberg.com/pip/simple/ blpapi==3.16.2 and it works great. However I cannot figure out how to include the package as a dependency in my setup.py file. I’ve tried setting the dependency_links ..

Read more

I have custom repository that looks similarly to following: my_package ├── conf | └── cfg.yaml ├── sub_package | └── utils.py └── some_module.py README.md requirements.txt setup.py When I use local install (pip install .) everything works fine but when I try to install my package from Git (pip install git+ssh://[email protected]/path/to/repo/my_package.git) I cannot find conf with cfg.yml ..

Read more

We have a package that generates code by means of $PYTHON -m grpc_tools.protoc -I="foo_proto" –python-out="$package/out" –grpc_python_out="$package/out" ./path/to/file.proto This was integrated (read hacked) into our setup.py building by means of: from distutils.command.build_py import build_py class BuildPyCommand(build_py): """ Generate GRPC code before building the package. """ def run(self): import subprocess subprocess.call(["./bin/generate_grpc.sh", sys.executable], shell=True) build_py.run(self) setup( …. cmdclass={ ..

Read more

The relevant lines setup.py are: … install_requires=[ … "torchvision==0.9.0+cu111", ], dependency_links=["https://download.pytorch.org/whl/torch_stable.html"], … When I run it I get: ERROR: Could not find a version that satisfies the requirement torchvision==0.9.0+cu111 ERROR: No matching distribution found for torchvision==0.9.0+cu111 I can install using pip fine i.e: pip install torchvision==0.9.0+cu111 Though this doesn’t work for my setup.py file, is ..

Read more

Developing Python-package. We call it data-provider. In requirements.txt it should have dependency: git+https://github.com/xzkostyan/[email protected]b63ef0e4#egg=clickhouse-sqlalchemy I do have to use this commit. The setup.py: import os import re from setuptools import setup, find_packages def read(file_path: str): return open( os.path.join( os.path.dirname(__file__), file_path, ), ).read() setup( name="data-provider", use_scm_version=True, setup_requires=[‘setuptools_scm’], description="description", author="author", url="url", packages=find_packages(), install_requires=read(‘requirements.txt’).splitlines() ) When I try to ..

Read more

Here is what happened, First I created this main.py which basically parse a CSV into a Dataframe and log the result. import argparse import logging import apache_beam as beam from apache_beam.dataframe.convert import to_pcollection from apache_beam.dataframe.io import read_csv from apache_beam.options.pipeline_options import PipelineOptions, SetupOptions class ReadInput(beam.PTransform): def __init__(self, input_path: str): self.input_path = input_path def expand(self, pcoll): df ..

Read more