<commit_before>#!/bin/env python

import sys, config
from distutils.core import setup, Extension

def disable_fPIC():
  """Disable -fPIC in the c compiler command line.

  Some unix setups need -fPIC turned off to successfully compile
  video/libavcodec/i386/dsputil_mmx.c (and other files).  Distutils
  gets the flag by parsing python2.3/config/Makefile and storing the
  result in a cache.

  This function is a hack that depends on that internal distutils
  behavior, so it may someday stop working or corrupt distutils in an
  unexpected way."""

  import distutils.sysconfig
  distutils.sysconfig.get_config_vars() # parse Makefile and fill the _config_vars cache
  cv = distutils.sysconfig._config_vars
  for var in "CCSHARED","GCCSHARED":
    if var in cv:
      cv[var] = cv[var].replace('-fPIC','')
  for var in ("CXX",):
    if var in cv:
      cv[var] = cv[var].replace('gcc','g++')

MODULE_NAME= 'pymedia'
MMX_FILES= [
			'i386/cputest.c',
			'i386/dsputil_mmx.c',
			'i386/fdct_mmx.c',
			'i386/idct_mmx.c',
			'i386/motion_est_mmx.c',
			'i386/mpegvideo_mmx.c',
			'i386/simple_idct_mmx.c',
]

NONMMX_FILES= [
			'fdctref.c',
			'fft.c',
			'mdct.c',
]
<commit_msg>2.4 Python fixes<commit_after>#!/bin/env python

import sys, config
from distutils.core import setup, Extension

def disable_fPIC():
  """Disable -fPIC in the c compiler command line.

  Some unix setups need -fPIC turned off to successfully compile
  video/libavcodec/i386/dsputil_mmx.c (and other files).  Distutils
  gets the flag by parsing python2.3/config/Makefile and storing the
  result in a cache.

  This function is a hack that depends on that internal distutils
  behavior, so it may someday stop working or corrupt distutils in an
  unexpected way."""

  import distutils.sysconfig
  distutils.sysconfig.get_config_vars() # parse Makefile and fill the _config_vars cache
  cv = distutils.sysconfig._config_vars
  for var in "CCSHARED","GCCSHARED","CFLAGS","OPT":
    if var in cv:
      cv[var] = cv[var].replace('-fPIC','')
  for var in ("CXX",):
    if var in cv:
      cv[var] = cv[var].replace('gcc','g++')

MODULE_NAME= 'pymedia'
MMX_FILES= [
			'i386/cputest.c',
			'i386/dsputil_mmx.c',
			'i386/fdct_mmx.c',
			'i386/idct_mmx.c',
			'i386/motion_est_mmx.c',
			'i386/mpegvideo_mmx.c',
			'i386/simple_idct_mmx.c',
]

NONMMX_FILES= [
			'fdctref.c',
			'fft.c',
			'mdct.c',
]

{'fraction_non_alphanumeric': 0.12321278385197645, 'fraction_numerical': 0.022708158116063918, 'mean_word_length': 3.6830708661417324, 'pattern_counts': {'":': 2, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '1099389', 'n_tokens_mistral': 991, 'n_tokens_neox': 891, 'n_words': 240}