1

I am perplexed why this setup.py file

# -*- coding: utf-8 -*-
from setuptools import setup, find_packages

with open('README.rst', 'r', encoding='utf-8') as file:
    readme = file.read()

setup(
  name = 'PDIpy',      
  package_dir = {'pdi':'pdipy'},
  packages = find_packages(),
  package_data = {
          'pdipy': ['parameters/*'],
          'test': ['*']
          }, 
  version = '0.0.5',
  license = 'MIT',
  description = "Simulate Photodynamic Inactivation (PDI) of from a kinetics model of membrane oxidation.", 
  long_description = readme,
  author = 'Andrew Freiburger',               
  author_email = 'andrewfreiburger@gmail.com',
  url = 'https://github.com/freiburgermsu/PDIpy',   
  keywords = [
          'antibacterial',
          'photodynamic', 
          'biophysics',
          'computational',
          'biology',
          'medicine', 
          'PDI', 
          'antibiotics'
          ],
  install_requires = [
          'matplotlib',
          'tellurium', 
          'scipy', 
          'pandas',
          'sigfig',
          'hillfit',
          'chemw',
          'numpy'
          ]
)

copies this entire directory into the dist file, including the examples folder that is neither mentioned in the setup.py file nor contains any script that could be perceived to be a package by find_packages(). What in the setup file is erroneous, and how can it be resolved?

This error is strangely also occurring with old setup.py files that previously worked perfectly.

  • I just did `git clone https://github.com/freiburgermsu/PDIpy.git && cd PDIpy && python setup.py sdist` and looked into the generated `dist/PDIpy-0.0.5.tar.gz` — it didn't have subdirectory `examples. `tar tvf dist/PDIpy-0.0.5.tar.gz | grep -F example` is empty. – phd Apr 04 '22 at 14:20
  • 1
    Thank you @phd. The working theory (https://github.com/pypa/setuptools/issues/3246#issuecomment-1087644509) is that I have downloaded `setuptools-scm`, which is conflicting with my development of the module. – Freiburgermsu Apr 05 '22 at 15:15

1 Answers1

0

I have a similar issues. Tried using the following steps:

  1. Remove dist and *.egg-info folders.
  2. Instead of using python setup.py sdist, use python -m build --sdist.

More explanations are explained at this issues

Justin Xu
  • 13
  • 3