Cut the eggplant into slices, put them on a sloping surface with coarse salt to make sure they lose water (about half an hour). Rinse and dry well with paper towels. Half of these, remove the skin. Then cut them into cubes.
Fry it in hot oil (about 3 minutes), remove and set aside on paper towels and salt it .
Cut onion slightly. Fry the onion and add 1 cup of chopped tomatoes, the chopped olives, capers, pine nuts, raisins and chili pepper. Thicken the sauce, add the eggplant and cook 15 minutes all together.
At the end, prepare a glass with 3 teaspoons of sugar and a bit of white vinegar and warm water. Mix and add to the sauce. Cooking for 3 minutes.
If you wish, you can add a little fresh basil at the end.
Serve warm or cold.